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.

GridListControl - Get Mouse Coords on DoubleClick

Thread ID:

Created:

Updated:

Platform:

Replies:

58415 Mar 23,2007 09:25 AM Mar 25,2007 09:27 PM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 23, 2007 09:25 AM

How do I obtain the mouse coordinates of a double-click in the GridListControl?

What I really want to do is ignore double-clicks when they occur outside of a row of data in the grid. This can occur when when double-clicking to the right of all the columns.

Maybe there's some setting to tell the GLC not to raise the double-click event when not clicked on a valid row of data (not including the headers)

Thanks.
Andy

Administrator [Syncfusion]
Replied On March 23, 2007 12:30 PM

Hi Andy,

Try handling the Grid.CellDoubleClick event to achieve this.

private void Grid_CellDoubleClick(object sender, GridCellClickEventArgs e)
{
GridControlBase grid = sender as GridControlBase;
if( grid.Model[e.RowIndex,e.ColIndex].CellType == "Header") //It cancels the double click on the column header.
{e.Cancel = true;}
// To get MousePoints using e.MouseEventArgs
}

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 25, 2007 09:27 PM

That did the trick. Thanks.

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.

;