Respected sir,
Thank you for giving me solution to expand collapse functionality. Of rad grid
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
foreach (GridDataItem item in RadGrid1.MasterTableView.Items) |
{ |
if (item.Expanded) |
{ |
foreach (GridTableView childTableView in item.ChildItem.NestedTableViews) |
{ |
|
foreach (GridDataItem childitem in childTableView.Items) |
{ |
childitem.Expanded = true; } } |
} |
} |
} |
, now I want to call this function on update event of parent. I.e. if I click on update button its child items should expand.
Following is the code I have written for same,
protected void gvClientSetup_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName != "ExpandCollapse")
{
if (e.Item.OwnerTableView.Name == "gvClientSetup")
{
if (e.CommandName == "PerformInsert" || e.CommandName == "Update")
{
gvClientSetup_Insert_Update(source, e);
gvClientSetup_PreRender(source, e);
}
bindGrid()
}
}
}
It jump to pre render procedure , but if (item.Expanded) returns false
How should I make this to return true so that it will expand child items
Thanks.
Ajay