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.

Selection works with mouse but not keyboard

Thread ID:

Created:

Updated:

Platform:

Replies:

67457 Aug 19,2007 08:50 PM Aug 20,2007 12:28 AM Windows Forms 1
loading
Tags: GridControl
Kent Boogaart
Asked On August 19, 2007 08:50 PM

Hi,

I am using a GridDataBoundGrid control. If the user clicks a row I can use Selections.GetSelectedRange(...) to get the row. If the user uses the up and down cursor keys to change rows, the Selections.GetSelectedRange(...) method returns nothing.

How can I allow both clicking on a row and cursoring through rows to affect the selection?

Thanks

Jeba S [Syncfusion]
Replied On August 20, 2007 12:28 AM

Hi Icd,

Thank you for your details.

You can handle the SelectionChanged event and get the selected row using mouse and keyboard.


void Model_SelectionChanged(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventArgs e)
{
GridRangeInfoList rangelist;
this.gridDataBoundGrid1.Selections.GetSelectedRanges(out rangelist, true);
foreach (GridRangeInfo range in rangelist)
{
Console.WriteLine(range.ToString());
}
}


Please refer the sample which implements the above said feature.
http://websamples.syncfusion.com/samples/Grid.Windows/F67457/main.htm

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.

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.

;