I have grid nested inside the nested view template of another grid.
I also have custom filtering implemented in the nested grid where i provide a dropdown in the filtertemplate of the column.
I want to access the nested grid in the selectedindexchanged event for the combobox to set the filter value.
How can I get the reference to the grid.
This is what I am doing right now but I am wondering if there's a better way of doing this.
I also have custom filtering implemented in the nested grid where i provide a dropdown in the filtertemplate of the column.
I want to access the nested grid in the selectedindexchanged event for the combobox to set the filter value.
How can I get the reference to the grid.
This is what I am doing right now but I am wondering if there's a better way of doing this.
protected
void RadComboBoxRelatedContacts_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
RadComboBox list = (RadComboBox)sender;
string filterExpression = "([RelationType] = '" + list.SelectedValue + "')";
GridFilteringItem item = (GridFilteringItem)list.NamingContainer;
RadGrid gridKeyRel = (RadGrid)item.NamingContainer.NamingContainer.NamingContainer;
gridKeyRel.MasterTableView.FilterExpression = filterExpression;
gridKeyRel.MasterTableView.Rebind();
}