Articles in this section
Category / Section

How to Expand the Groups while changing the Itemsource in GridDataControl

1 min read

ExpandAllGroups method enables you to expand all groups present in GridDataControl. You need to hook the ItemsSourceChanged event to handle when ItemSource property of GridDataControl changes. You can call ExpandAllGroups method to expand all groups from ItemsSourceChange event.

C#

this.gridDataControl.ItemsSourceChanged += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(gridDataControl_ItemsSourceChanged);
 
void gridDataControl_ItemsSourceChanged(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
{
    this.gridDataControl.Model.Table.ExpandAllGroups();    
}

 

In another way, the value of IsGroupsExpanded property is set as ‘True, to expand the Groups automatically while changing the Itemsource.

C#

this.gridDataControl.IsGroupsExpanded = true;

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied