AD
Administrator
Syncfusion Team
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