When using ajax and the Telerik RadGrid control and a DropDownlistbox in the RadGrid, a postback or AJAX postback will automatically collapse the detailtableviews in the mastertableview. If you want to keep the the current detailview expanded use:
// Get current ScoreListId from DropDownList
DropDownList ddl = ((DropDownList)sender);
// code ….
// Update only the current ScoreList in the RadGrid with the updated data, by fireing the RadGrid_NeedDataSource event
((GridDataItem)ddl.Parent.Parent).OwnerTableView.Rebind();
// The rebind will collapse the current griditem, so expand it again.
((GridDataItem)ddl.Parent.Parent).OwnerTableView.ParentItem.Expanded = true;
Thanks for this. Such a simple solution but exactly what I needed!
In fact, all I needed was …
protected void RadGrid3_ItemCommand(object sender, GridCommandEventArgs e)
{
…
e.Item.OwnerTableView.Rebind();
e.Item.OwnerTableView.ParentItem.Expanded = true;
..
}