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.

How to prevent a caption row in a ggc from expanding the group when a cell in that row receives focus

Thread ID:

Created:

Updated:

Platform:

Replies:

53006 Dec 7,2006 12:10 AM Dec 7,2006 12:33 AM Windows Forms 1
loading
Tags: Grouping
James Blibo
Asked On December 7, 2006 12:10 AM

i have a ggc with one level of grouping; when i use the arror key and navigate to the caption row, the group expands if it is collapse.

How can i prevent this and only allow user to expand the group by click the plus/minus button.

Administrator [Syncfusion]
Replied On December 7, 2006 12:33 AM

Hi James,

You can handle TableControlCellButtonClicked event to set the IsClickExpand flag( sClickExpand = true;) and check this falg to expand the group in the GroupExpanding event of the grid. Here is a code snippet to show this.

bool IsClickExpand = false;
private void gridGroupingControl1_TableControlCellButtonClicked(object sender, GridTableControlCellButtonClickedEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex,e.Inner.ColIndex] as GridTableCellStyleInfo;
if( style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionPlusMinusCell)
IsClickExpand = true;
}

private void gridGroupingControl1_GroupExpanding(object sender, GroupEventArgs e)
{
if(IsClickExpand)
IsClickExpand = false;
else
e.Cancel = true;
}

Best Regards,
Haneef

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.

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.

;