In my RadGrid, I am creating columns dynamically in code behind. One column is a GridDropDownColumn which is created as follows.
ListDataMemeber is set to corresponding table name in DataSet to which the RadGrid is bound.
Now, this column appears fine in as a Bound Column Display mode , and appears as a RadComboBox in Edit Mode, with correct values.
However, the issue is that the "ExtractValuesFromItem" in Radgrid_UpdateCommand doesn't get the value for this GridDropDownColumn.
GridDropDownColumn columnn = new GridDropDownColumn();TRG.MasterTableView.Columns.Add(columnn);columnn.ListDataMember = "Department";columnn.DataField = "Id";columnn.ListTextField = "Name";columnn.ListValueField = "Id";columnn.DropDownControlType = GridDropDownColumnControlType.RadComboBox;columnn.UniqueName = "Department";columnn.HeaderText = "Department";ListDataMemeber is set to corresponding table name in DataSet to which the RadGrid is bound.
Now, this column appears fine in as a Bound Column Display mode , and appears as a RadComboBox in Edit Mode, with correct values.
However, the issue is that the "ExtractValuesFromItem" in Radgrid_UpdateCommand doesn't get the value for this GridDropDownColumn.
protected void MyGrid_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e){ Hashtable NewData = new Hashtable(); e.Item.OwnerTableView.ExtractValuesFromItem(NewData, (GridEditableItem)e.Item);}
If there are total 12 columns in my RadGrid, then, there are 11 in "NewData" hashtable, and the GridDropDownColumn's value is missing.
What is the correct way to achieve this?