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. Image for the cookie policy date
close icon

select row with keyboard

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

3 Replies

AD Administrator Syncfusion Team August 31, 2006 02:55 PM UTC

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


XI xiaojie August 31, 2006 03:24 PM UTC

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


AD Administrator Syncfusion Team August 31, 2006 04:19 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon