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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Activating a cell on mouse-over

Thread ID:

Created:

Updated:

Platform:

Replies:

59626 Apr 18,2007 06:35 PM UTC Apr 19,2007 02:10 PM UTC WinForms 2
loading
Tags: GridControl
Tom Zehrbach
Asked On April 18, 2007 06:35 PM UTC

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

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

Tom Zehrbach
Replied On 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

CONFIRMATION

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.

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

;