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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl. Group auto expanded when caption row is selected

Thread ID:





54197 Jan 3,2007 07:11 PM UTC Jan 4,2007 04:50 AM UTC WinForms 1
Tags: GridControl
Dmitry Scherbakov
Asked On January 3, 2007 07:11 PM UTC

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 4, 2007 04:50 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon