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.

Focus on cell to use the keyboard

Thread ID:

Created:

Updated:

Platform:

Replies:

94282 May 4,2010 05:20 AM May 18,2010 02:38 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 4, 2010 05:20 AM

I'm using a GridControl and setting a selection programatically the first time the form is activated with:

gridControl.Select();
gridControl.Selections.SelectRange(GridRangeInfo.Cell(2, 2), true);

The problem is that the keyboard arrows wont't work until I click the cell, after that all is well. This app I'm working on requires to be (optionally) used without a mouse, so you see the problem.

Paulo

Arulraj A [Syncfusion]
Replied On May 18, 2010 02:38 AM

Hi Paulo,

Thanks for your interest in Syncfusion Products.

To enable the arrow key operations in grid where selection is handled programmatically, you need to activate the respective cell. Using the following code, this can be achieved.

gridControl1.Select();
gridControl1.Selections.SelectRange( GridRangeInfo.Cell(2, 2), true);
gridControl1.CurrentCell.Activate(2, 2); //This method will activate the specified cell on keyPressed event


Here is a sample for your reference.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=KeyBoardActivation-1964978101.zip


Regards,
Arulraj

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.

;