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

Issue with arrow key navigation of Grouping Grid control

If i use arrow keys to navigate thru the grouping grid, download traversal works fine whereas if its upward traversal of records event SelectedRecordsChanged will return me selected record as "selected record - 1" . Please find attached sample application.

GroupGridKeyNavigationIssue.zip

2 Replies

AD Administrator Syncfusion Team July 20, 2006 12:32 PM UTC

Hi Gopi,

The SelectedRecordsChanged event will get fired for three different actions such as Added, Removed and Reset. You can check this out in the e.Action.
The reason for the weird behavior which you are getting while traversing upwards, is because, when you move up, the record that was selected will be removed from the SelectedRecords collection and then the current record will be added to the collection. When you traverse down, it vice-versa, the current record will get added and then the previous record will be removed from the SelectedRecords collection.

Please add the below code, to get this working properly.

if(e.Action == SelectedRecordsChangedType.Added)
{
textBoxComp.Text = e.SelectedRecord.Record.GetValue("CompanyName").ToString();
}

Let me know if you have any further questions.
Thanks for using Syncfusion Products.

Regards,
Rajagopal


AD Administrator Syncfusion Team July 20, 2006 12:41 PM UTC

Hi Gopi,

The SelectedRecordsChanged event will get fired for three different actions such as Added, Removed and Reset. You can check this out in the e.Action.

The reason for the weird behavior which you are getting while traversing upwards, is because, when you move up, the current record will get added to the SelectedRecords collection and then the previously selected record will be removed from the collection. So, the action that was last checked is for Removed, so this returned the previously selected and not the current one.
When you traverse downwards, it vice-versa, the record will get removed and then current record will be added to the SelectedRecords collection.

Please add the below code, to get this working properly.

if(e.Action == SelectedRecordsChangedType.Added)
{
textBoxComp.Text = e.SelectedRecord.Record.GetValue("CompanyName").ToString();
}

Let me know if you have any further questions.
Thanks for using Syncfusion Products.

Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon