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

CurrentCellMoved, from user or from context change

I''d like to be able to do some things based on whether the user has clicked in a cell or, perhaps, used the arrow keys, tabs or some other keyboard/mouse initiated way of changing the current row in my data bound grid. The CurrentCellMoved event seems reasonable except for the fact that it gets fired when there is some position change in the underlying dataset as well. Is there a way of differentiating between when a user manipulates position directly on the grid and when the grid position changes as a ersult of an underlying dataset change? Preferably without having to create a variety MouseDown and KeyPress event handlers? Thanks in advance!

1 Reply

AD Administrator Syncfusion Team November 17, 2005 12:21 AM UTC

There is not a single event you can catch, but I think you can do it by catching two events.
private void gridDataBoundGrid1_QueryNextCurrentCellPosition(object sender, Syncfusion.Windows.Forms.Grid.GridQueryNextCurrentCellPositionEventArgs e)
{
	Console.WriteLine("Move from inside grid");
}

private void gridDataBoundGrid1_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
{
	Console.WriteLine("Move from inside grid");
}

Loader.
Live Chat Icon For mobile
Up arrow icon