Hi Team ,
I am adding group by experissions progrmatically in my code and it is working as expected , I want to Expnad / Collpase selected group header , I am using below code in Item_Command and able to Collapse/Expand groups as required but when I click next page Grid rebinds and grouping is lost , can you suggest how to go about this problem .
if (e.CommandName == RadGrid.ExpandCollapseCommandName)
{
GridGroupHeaderItem groupHeaderItem = (GridGroupHeaderItem)e.Item;
if (groupHeaderItem.Expanded==true)
groupHeaderItem.Expanded = false;
else
groupHeaderItem.Expanded = true;
}
I am adding group by experissions progrmatically in my code and it is working as expected , I want to Expnad / Collpase selected group header , I am using below code in Item_Command and able to Collapse/Expand groups as required but when I click next page Grid rebinds and grouping is lost , can you suggest how to go about this problem .
if (e.CommandName == RadGrid.ExpandCollapseCommandName)
{
GridGroupHeaderItem groupHeaderItem = (GridGroupHeaderItem)e.Item;
if (groupHeaderItem.Expanded==true)
groupHeaderItem.Expanded = false;
else
groupHeaderItem.Expanded = true;
}
Thanks
NS
if (item.IsInEditMode)
item.Expanded =
false;
}