Hi,
I have a radgrid that have a radcombobox in the header of one of the columns. I'm building the radcombobox in the OnItemCreated event. When I select a value in the radcombobox, I filter the grid based on the selected value and store the selected value in the session. My problem is in the radgrid OnPreRender event, I'm trying to set the selected value of the radcombo box and it is not been set. the control is ajaxified, I can see through the debugger that is setting the correct selected item, but when the grid shows up, the value is not selected. Any ideas?
This is the code I'm using to set the selected item
Thanks in adavance
I have a radgrid that have a radcombobox in the header of one of the columns. I'm building the radcombobox in the OnItemCreated event. When I select a value in the radcombobox, I filter the grid based on the selected value and store the selected value in the session. My problem is in the radgrid OnPreRender event, I'm trying to set the selected value of the radcombo box and it is not been set. the control is ajaxified, I can see through the debugger that is setting the correct selected item, but when the grid shows up, the value is not selected. Any ideas?
This is the code I'm using to set the selected item
protected void radGridUnits_OnPreRender(object sender, EventArgs e)
{
// Select the last selected value
if (Session["filteredByPendingAction"] != null
)
foreach (GridHeaderItem h in radGridUnits.MasterTableView.GetItems(GridItemType.Header))
{
((RadComboBox)h["ExternalActions"].FindControl("radComboFilteredByPendingActions")).FindItemByValue(Session["filteredByPendingAction"].ToString()).Selected = true;
((RadComboBox)h["ExternalActions"].FindControl("radComboFilteredByPendingActions")).DataBind();
break;
}
}
Thanks in adavance