I have a RadGrid control that has a RadComboBox control in edit mode in the Grid. I am able to populate and select a default value on edit. However, when I look for the updated values of the combobox, I am retrieving what was initially set as the value of the Rad ComboBox. In the example code below, I am trying to store the value in the variable d from the SelectedValue of the cboAccess ComboBox
Thanks in adavance for your help.
Tommy
Thanks in adavance for your help.
Tommy
protected void rdgAccess_UpdateCommand(object source, GridCommandEventArgs e)
{
GridEditableItem item = (GridEditableItem)e.Item;
GridEditManager em = item.EditManager;
RadComboBox r = (RadComboBox)item.FindControl("cboAccess");
string d = r.SelectedValue.ToString();
string id = item.GetDataKeyValue("DerivedDepartment").ToString();
int vl = -1;
if (int.TryParse(r.SelectedValue, out vl) && vl > 0)
{
rdgAccess.Controls.Add(
new LiteralControl(id + " now has " + r.SelectedItem.Text + " access."));
}
else
{
rdgAccess.Controls.Add(
new LiteralControl(id + " does not have access."));
}
}