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 to get the Row and Column Index of the cell from Mouse Point?

In GridControl, you can get the Row and Column Index of a cell under the Mouse Point, by using PointToCellRowColumnIndex and PointToCellRowColumnIndexOutsideCells.

PointToCellRowColumnIndex:

This method allows you to get the Row and Column Index of a cell under the mouse point in GridControl, regardless of its position.

Syntax: PointToCellRowColumnIndex (Point p);

C#

PointToCellRowColumnIndexOutsideCells:

This method allows you to get the Row and Column Index of the cell under the mouse point in GridControl. It also allows you to identify whether you have clicked inside the cell or points outside the cell, that is, Points over the Gridlines.

Syntax: PointToCellRowColumnIndexOutsideCells(Point p, bool allowOutsideLines)

C#

You can easily identify whether you have clicked at any point inside the cell or outside the cell by setting allowOutsideLines as False. It returns negative values for the points that are outside the cell.

Article ID: Published Date: Last Revised Date: Platform: Control:
3007 12/08/2014 12/08/2014 WPF GridControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.