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

Expand/Collapse all groups

hi, can you please tell me how to programatically expand or collapse all groups in a GGC? thanks.

3 Replies

AD Administrator Syncfusion Team January 29, 2007 02:42 PM UTC

i figured out how to do it. thanks. yet i have another questions--How to programatically expand/collapse a particular group, once a GroupCaptionCell is single clicked. below is my partial code. thanks.

private void TableControl_CellClick(object sender, GridCellClickEventArgs e)
{
Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfo ci
= this.gridGroupingControl1.TableModel[e.RowIndex, e.ColIndex];
if ( ci.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell )
{
//How to do it?
}
}


AD Administrator Syncfusion Team January 29, 2007 06:55 PM UTC

Hi,

Please try this

Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfo ci = this.gridGroupingControl1.TableModel[e.RowIndex, e.ColIndex];
if ( ci.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell )
{
Element ell = ci.TableCellIdentity.DisplayElement;
if(ell.ParentGroup != null)
el.ParentGroup.IsExpanded = true;
}

Best Regards,
Haneef


AD Administrator Syncfusion Team January 29, 2007 10:03 PM UTC

it works. thanks.

Loader.
Live Chat Icon For mobile
Up arrow icon