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 trying to select a row based on the mouse position. How to I know which row the mouse pointer is on from a the mouse coordiantes in the MouseEventArgs?
HAhaneefm Syncfusion Team October 29, 2007 11:06 PM UTC
Hi Shariff,
You could determine the rowindex of the grid using the grid.PointToRowCol() method in the MouseDown event of the grid.
int row, col; void gridControl1_MouseDown(object sender, MouseEventArgs e) { Point pt = new Point(e.X, e.Y); this.gridControl1.PointToRowCol(pt, out row, out col); Console.WriteLine("RowIndex: {0}", row); this.gridControl1.Model.Selection.Add(GridRangeInfo.Row(row)); }