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.

Expand/Collapse all groups

Thread ID:

Created:

Updated:

Platform:

Replies:

55366 Jan 29,2007 09:23 AM Jan 29,2007 05:03 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 29, 2007 09:23 AM

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

Administrator [Syncfusion]
Replied On January 29, 2007 09:42 AM

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?
}
}

Administrator [Syncfusion]
Replied On January 29, 2007 01:55 PM

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

Administrator [Syncfusion]
Replied On January 29, 2007 05:03 PM

it works. thanks.

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.

;