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

selecting a row from mouse position

Thread ID:





69472 Oct 29,2007 06:26 PM UTC Oct 29,2007 11:06 PM UTC WinForms 1
Tags: GridControl
Asked On October 29, 2007 06:26 PM UTC

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?


haneefm [Syncfusion]
Replied On 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);

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to 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