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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

54197 Jan 3,2007 07:11 PM UTC Jan 4,2007 04:50 AM UTC WinForms 1
loading
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

thanks
Dmitry

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;
else
e.Cancel = true;
}

Best Regards.
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.

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

;