We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grouping grid Expand/Collapse

Hi, Ours is windows application in which we are using Grouping grid. We have other control named "OK" button. If all the groups are collapsed or no records are visible under any group, "OK" button should be disabled. If any of the group is expanded and record is visble then "OK" button should be enabled. This is applicable for both single and multi level grouping. Is there any method/property that can be used? Syncfusion Version - 3.1 .Net Framework Version - 1.1 Regards, Prathima.

1 Reply

AD Administrator Syncfusion Team July 10, 2006 06:23 PM UTC

Hi Prathima, You need to handle the GroupExpanding event for Enable the OKbutton and GroupCollapsed event for disable the OKbutton.Please refer the attahed sample for more details. Let me know if this helps. bool flag = true; private void gridGroupingControl1_GroupExpanding(object sender, Syncfusion.Grouping.GroupEventArgs e) { button1.Enabled = true; } private void gridGroupingControl1_GroupCollapsed(object sender, Syncfusion.Grouping.GroupEventArgs e) { flag = false; iterate(this.gridGroupingControl1.Table.TopLevelGroup); } public void iterate(Group g) { if( g.IsExpanded && ! g.IsMainGroup ) { flag = true; button1.Enabled = true; System.Diagnostics.Trace.WriteLine("GroupLevel = "+g.Info +"::::>" + g.IsExpanded ); } if ( flag ) { return; } else button1.Enabled = false; foreach(Group gr in g.Groups) { iterate(gr); } } Sample: NestedGroups.zip Best Regard, Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon