GGC: Ctrl + Up/Down keys causes focus to jump

GGC: Ctrl + Up/Down keys causes focus to jump all (or lots) records Up/Down. Is there any legal way (not by KeyPress handling) of processing this NOT to jupm, just react the same way as usual Up/Down? A property or something?

Thank for your help.

1 Reply

AD Administrator Syncfusion Team December 20, 2006 08:59 AM UTC

Hi Konstantin,

There is no built-in property to change this behavior. But one way you can do this by handling the CurrentCellKeyDown event of the grid. Here is a code snippet to show this.

private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
GridCurrentCell cc = (sender as GridControl).CurrentCell;
Keys keys = e.KeyData & Keys.Control;
if( keys == Keys.Control )
{
switch(e.KeyCode)
{
case Keys.Up:
e.Handled = true;
cc.MoveUp();
break;
case Keys.Down :
e.Handled = true;
cc.MoveDown();
break;
case Keys.Right:
e.Handled = true;
cc.MoveRight();
break;
case Keys.Left:
e.Handled = true;
cc.MoveLeft();
break;
}
}
}

Best Regards,
Haneef

Loader.
Up arrow icon