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.

Issue with arrow key navigation of Grouping Grid control

Thread ID:

Created:

Updated:

Platform:

Replies:

46739 Jul 19,2006 03:37 PM Jul 20,2006 08:41 AM Windows Forms 2
loading
Tags: GridControl
Gopinath Jayamuni
Asked On July 19, 2006 03:37 PM

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

Administrator [Syncfusion]
Replied On July 20, 2006 08:32 AM

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

Administrator [Syncfusion]
Replied On July 20, 2006 08:41 AM

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

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.

;