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.
Unfortunately, activation email could not send to your email. Please try again.

Grouping grid Expand/Collapse

Thread ID:

Created:

Updated:

Platform:

Replies:

46253 Jul 10,2006 05:34 AM Jul 10,2006 02:23 PM Windows Forms 1
loading
Tags: GridControl
Prathima Venkobachar
Asked On July 10, 2006 05:34 AM

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.

Administrator [Syncfusion]
Replied On July 10, 2006 02:23 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;