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.

GridGroupingControl. Group auto expanded when caption row is selected

Thread ID:





54197 Jan 3,2007 02:11 PM Jan 3,2007 11:50 PM Windows Forms 1
Tags: GridControl
Dmitry Scherbakov
Asked On January 3, 2007 02:11 PM

How to prevent Group from expanding when caption row is selected? I only need to expand the Group when +/- PushButton is used


Administrator [Syncfusion]
Replied On January 3, 2007 11:50 PM

Hi Dmitry ,

To prevent the expanding of the group when the caption row is selected, you need to handle the GroupExpanding event of grid. Here is a code snippet to show this.

private void gridGroupingControl1_GroupExpanding(object sender, GroupEventArgs e)
string TableName = e.Group.ParentTableDescriptor.Name;
GridTableControl tc = (sender as GridGroupingControl).GetTableControl(TableName);
Point pt = tc.PointToClient(MousePosition);
GridTableCellStyleInfo style = tc.PointToTableCellStyle(pt);
if( style != null && style.TableCellIdentity != null
&& style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionPlusMinusCell)
e.Cancel = false;
e.Cancel = true;

Best Regards.


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.