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 can you handle right click events in a row without resulting in that row being selected?

Thread ID:

Created:

Updated:

Platform:

Replies:

14697 Jun 2,2004 12:25 PM Jun 2,2004 02:40 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 2, 2004 12:25 PM

I need to catch right clicking in rows to show a menu, but I don''t want the resulting right click to change the selection. For instance, 3 rows are selected (contiguous or not), and then a right click is done (anywhere in the grid), I want to show a menu to operate on those 3 rows. Currently right clicking simply changes the selection to the row that was right clicked on, definitely not what I need.

Administrator [Syncfusion]
Replied On June 2, 2004 01:44 PM

Check out this KB to see if it is what you need. http://www.syncfusion.com/Support/article.aspx?id=10430

Administrator [Syncfusion]
Replied On June 2, 2004 02:29 PM

This works but then the grid doesn''t fire the cell_click event, which I need in order to show the menu. >Check out this KB to see if it is what you need. > >http://www.syncfusion.com/Support/article.aspx?id=10430

Administrator [Syncfusion]
Replied On June 2, 2004 02:40 PM

grid.MouseDown and grid.MouseUp events will be fired. Can you use those events. If you need the row and column of the click, you can use: int row, col; Point pt = new Point(e.X, e.Y); if(grid.PointToRowCol(pt, out row, out col, -1)) { //show menu at row, col }

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.

;