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.
Platform : Windows Forms
|
Category : Datagrid

How can I translate a point to a cell in the datagrid

If the point, say pt, is in screen coordinates, you can use code such as If you are using context menus for catching right-clicks in the grid, you have to do a little work to remember where the original right-click point was as the point passed in through the menu event arguments may not reflect this original click. One solution is to remember the click in the grid MouseDown event, and then use the code above to retrieve the grid cell from within the menu handler.

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.