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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the Row and Column Index of the cell from Mouse Point?

Platform: WPF |
Control: GridControl |
Published Date: December 8, 2014 |
Last Revised Date: December 8, 2014
Tags: general

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.

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon