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. Image for the cookie policy date
close icon

Cell HitTest

Hi Is there a way to pass x,y mouse co-ordinates in a SyncFusion grid and return the cell or RowIndex/ColIndex of the cell it's in. I know that in the majority of cases the grid.CurrentCell works, but in some instances (like when columns are being multi selected) the last cell clicked isn't always the .CurrentCell. Thanks Martin

1 Reply

AD Administrator Syncfusion Team August 13, 2003 12:24 PM UTC

Given a Point pt in grid coordinates, you can use PointToRowCol to get the row and col. int rowIndex, colIndex; this.gridDataBoundGrid1.PointToRowCol(pt, out rowIndex, out colIndex, -1); 'or in VB Dim rowIndex, colIndex As Integer Me.gridDataBoundGrid1.PointToRowCol(pt, rowIndex, colIndex, - 1)

Loader.
Live Chat Icon For mobile
Up arrow icon