You cannot call a CurrentCell.MoveTo if the grid is in the process of deactivating or activating a cell. (Sort of like calling a MoveTo from within a MoveTo - the grid does not know how to handle this.)
I suspect this is what is going on at the point you called MoveTo. The grid was already in the process.
If you want to do someting like this, you can handle MouseDown, remember the cell. And then handle MouseUp, checking to see if it is the same MouseDown cell, and if it is a cell you do not want to click. If it is, then call MoveTo at that point.
private int mouseDownRow = -1;
private int mouseDownCol = -1;
private void gridControl1_GridControlMouseDown(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e)
{
this.gridControl1.PointToRowCol(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y), out mouseDownRow, out mouseDownCol, -1);
}
private void gridControl1_GridControlMouseUp(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e)
{
int row;
int col;
if( this.gridControl1.PointToRowCol(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y), out row, out col, -1)
&& row == mouseDownRow && col == mouseDownCol)
{
//change the click from cell 2,2 to 1,1
if(row == 2 && col == 2)
{
this.gridControl1.CurrentCell.MoveTo(1,1);
// and/or maybe
//this.gridControl1.ScrollCellInView(1,1);
}
}
mouseDownRow = -1;
mouseDownCol = -1;
}