Hi All,
Is anyone able to provide a sample of a Grid with a column that has a CellEditType of DropdownEdit and is bound to a data source using DropDownDataSource but using the GridPropertiesModel?
I construct my GridPropertiesModel like this, I can see that the data source for the column is correctly populated in the view, (List of strings) but the dropdown is still empty...
GridPropertiesModel<DataRow> model = new GridPropertiesModel<DataRow>()
{
ActionMode = ActionMode.JSON,
DataSource = m_API.execQuery("select * from TEST").AsEnumerable()
};
GridEditing edit = new GridEditing()
{
AllowNew = true,
EditMode = GridEditMode.Normal,
AllowEdit = true,
AllowDelete = true,
PrimaryKey = new List<string> { "ID" }
};
model.Columns = new List<GridColumn<DataRow>>
{
new GridColumn<DataRow>
{
HeaderText = "Column A",
MappingName = "ID"
},
new GridColumn<DataRow>
{
HeaderText = "Column B",
MappingName = "COLUMN1",
CellEditType = CellEditType.DropdownEdit
},
new GridColumn<DataRow>
{
HeaderText = "Column C",
MappingName = "TYTY1",
CellEditType = CellEditType.DropdownEdit,
DropDownDataSource = new List<string> { "AAA", "BBB", "CCC", }
},
};
Much appreciated, Laz