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.
Unfortunately, activation email could not send to your email. Please try again.

Activating a cell on mouse-over

Thread ID:

Created:

Updated:

Platform:

Replies:

59626 Apr 18,2007 02:35 PM Apr 19,2007 10:10 AM Windows Forms 2
loading
Tags: GridControl
Tom Zehrbach
Asked On April 18, 2007 02:35 PM

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 03:09 PM

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 10:10 AM

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.

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.

;