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

Activating a cell on mouse-over

In an Essential Grid (for Windows), how can I activate a cell on either mouse over or mouse hover?

2 Replies

HA haneefm Syncfusion Team April 18, 2007 07:09 PM UTC

Hi Tom,

One way you can do this by handling the MouseMove event of the grid and call CurrentCell.MoveTo method to move the current cell required position. Here is a code.

private void gridControl1_MouseMove(object sender, MouseEventArgs e)
{
GridControl grid = sender as GridControl;
int row,col;
grid.PointToRowCol(new Point(e.X,e.Y),out row, out col);
grid.CurrentCell.MoveTo(row,col,GridSetCurrentCellOptions.SetFocus);
}

Best regards,
Haneef


TZ Tom Zehrbach April 19, 2007 02:10 PM UTC

That works great, Haneef, thanks.




>Hi Tom,

One way you can do this by handling the MouseMove event of the grid and call CurrentCell.MoveTo method to move the current cell required position. Here is a code.

private void gridControl1_MouseMove(object sender, MouseEventArgs e)
{
GridControl grid = sender as GridControl;
int row,col;
grid.PointToRowCol(new Point(e.X,e.Y),out row, out col);
grid.CurrentCell.MoveTo(row,col,GridSetCurrentCellOptions.SetFocus);
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon