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.

select row with keyboard

Thread ID:

Created:

Updated:

Platform:

Replies:

48636 Aug 31,2006 10:24 AM Aug 31,2006 12:19 PM Windows Forms 3
loading
Tags: GridControl
xiaojie
Asked On August 31, 2006 10:24 AM

how do select a row in the databoundgrid with keyboard only, say the up, down, tab key?
thanks

Administrator [Syncfusion]
Replied On August 31, 2006 10:55 AM

Hi Pam,

You can set the ListBoxSelectionMode property of the grid.

//
this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.MultiExtended;
//

// Add the below code, to avoid selection through mouse
private void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
if(e.Reason == GridSelectionReason.MouseDown)
{
e.Cancel = true;
}
}

Regards,
Rajagopal

xiaojie
Replied On August 31, 2006 11:24 AM

Hi Rajagopal:
thanks for replying, but I want to be able to select rows both from mouse and keyboard, does the code snippet do that?
thanks
Pam

Administrator [Syncfusion]
Replied On August 31, 2006 12:19 PM

Hi Pam,

If you want to select through both mouse and keyboard, then avoid the code given in the previous thread for the SelectionChanging event.

Please refer to the "GridControl - Selections" topic in the evaluation center link below:
http://www.syncfusion.com/support/EvaluationCenter/default.aspx?cNode=5

Thanks,
Rajagopal

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.

;