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.
Syncfusion Feedback

Syncfusion.Grid.Grouping.Windows using want to avoid Right Click for sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

61071 May 17,2007 02:27 AM UTC May 17,2007 04:16 PM UTC Windows Forms 3
loading
Tags: GridControl
Ashok
Asked On May 17, 2007 02:27 AM UTC

Hi Syncfusion.Grid.Grouping.Windows using,
i want to give same feature in our grid, but when user do right click column sort.



Right Click on header.zip

haneefm [Syncfusion]
Replied On May 17, 2007 03:37 PM UTC

Hi,

This can be achieved by handling a the TableControlQueryAllowSortColumn event handler and set the e.AllowSort property to false when the MouseButton is right clicked . Here is a code snippet to show this.

this.gridGroupingControl1.TableControlQueryAllowSortColumn +=new GridQueryAllowSortColumnEventHandler(gridGroupingControl1_TableControlQueryAllowSortColumn);
private void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
{
if( e.CellClickEventArgs.MouseEventArgs.Button == MouseButtons.Right )
e.AllowSort = false;
}

Best regards,
Haneef

Ashok
Replied On May 17, 2007 04:02 PM UTC

Hi CellClick event agrs not defined,
so what we have to declare events or what


>Hi,

This can be achieved by handling a the TableControlQueryAllowSortColumn event handler and set the e.AllowSort property to false when the MouseButton is right clicked . Here is a code snippet to show this.

this.gridGroupingControl1.TableControlQueryAllowSortColumn +=new GridQueryAllowSortColumnEventHandler(gridGroupingControl1_TableControlQueryAllowSortColumn);
private void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
{
if( e.CellClickEventArgs.MouseEventArgs.Button == MouseButtons.Right )
e.AllowSort = false;
}

Best regards,
Haneef

Right Click on header1.zip

Ashok
Replied On May 17, 2007 04:16 PM UTC

Done Thanks i capture event from other evnet handler, is there any straight forward

>Hi CellClick event agrs not defined,
so what we have to declare events or what


>Hi,

This can be achieved by handling a the TableControlQueryAllowSortColumn event handler and set the e.AllowSort property to false when the MouseButton is right clicked . Here is a code snippet to show this.

this.gridGroupingControl1.TableControlQueryAllowSortColumn +=new GridQueryAllowSortColumnEventHandler(gridGroupingControl1_TableControlQueryAllowSortColumn);
private void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
{
if( e.CellClickEventArgs.MouseEventArgs.Button == MouseButtons.Right )
e.AllowSort = false;
}

Best regards,
Haneef

Right Click on header1.zip

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

;