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.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

53719 Dec 19,2006 08:05 AM Dec 20,2006 03:59 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 19, 2006 08:05 AM

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.

Administrator [Syncfusion]
Replied On December 20, 2006 03:59 AM

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

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

;