The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm sure I've seen code to do this before, but I can't seem to find it. How does one convert an X,Y coordinate into a row and column when the user clicks on the grid (say, for example, in the gri'd MouseUp event)?
ADAdministrator Syncfusion Team October 15, 2003 02:31 PM UTC
You use the grid.PointToRowCol method. The point you pass in must be in the grid coordinates.
Point pt = grid.PointToClient(Control.MousePosition);
int rowIndex, colIndex;
grid.PointToRowCol(pt, out rowIndex, out colIndex);
If you are in one of the grid's mouse events, the e.X and e.Y are in the grid's coordiante system, so you can just use
Point pt = new Point(e.X, e.Y);
to get the point and not have to call PointToClient.