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. Image for the cookie policy date

GridGroupingControl - Disable sorting on right-click

Hi How can I set a GridGoupingControl to sort only on left-click and not on right-click? Thanks, Sameer

2 Replies

AD Administrator Syncfusion Team December 15, 2004 04:13 AM

You can handle the TableControlCellClick event and cancel it if it is the right button.
private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
	if(e.Inner.MouseEventArgs.Button == MouseButtons.Right)
		e.Inner.Cancel = true;
}


SP Sameer Patil December 15, 2004 05:32 AM

Works fine. Thanks! Sameer >You can handle the TableControlCellClick event and cancel it if it is the right button. >
>private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
>{
>	if(e.Inner.MouseEventArgs.Button == MouseButtons.Right)
>		e.Inner.Cancel = true;
>}
>

Loader.
Live Chat Icon For mobile
Up arrow icon