DevExpress ASP.NET MVC Combobox not showing the values
Posted
by
Taskos George
on Stack Overflow
See other posts from Stack Overflow
or by Taskos George
Published on 2014-05-29T03:21:34Z
Indexed on
2014/05/29
3:24 UTC
Read the original article
Hit count: 621
In my PartialView I add a grid with a column that I need to be a combobox in this way.
settings.Columns.Add(column =>
{
column.FieldName = "TheFieldName";
column.Caption = ""ACaption;
column.ColumnType = MVCxGridViewColumnType.ComboBox;
var comboBoxProperties = column.PropertiesEdit as ComboBoxProperties;
comboBoxProperties.DataSource = ViewData["MyListOfObjects"];
comboBoxProperties.TextField = "Description";
comboBoxProperties.ValueField = "Description";
comboBoxProperties.ValueType = typeof(String);
});
The ViewData is populated in the Index method of the Controller and I have checked that it is populated with objects that contain values.
The Combobox in the PopupEditForm not showing anything.
Any idea what could be wrong?
Regards.
© Stack Overflow or respective owner