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.Grid.Grouping.Windows using want to avoid Right Click for sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

61071 May 16,2007 10:27 PM May 17,2007 12:16 PM Windows Forms 3
loading
Tags: GridControl
Ashok
Asked On May 16, 2007 10:27 PM

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 11:37 AM

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 12:02 PM

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 12:16 PM

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.

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.

;