This is a migrated thread and some comments may be shown as answers.

Updating groups leads to invalid state

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 31 Oct 2011, 08:09 PM
Hi, guys.

I'm displaying some collection in grid which has two columns: name and type.
I'm grouping by type then. When I update type for my entity, PropertyChanges is raised by this entity, but the group is not changed for some reason. I've searched a lot through this forum and found out that you update groups only on CollectionChanged.
So, for updating the group I'm doing the following for each entity which was changed:

gridView.Items.EditItem(entity);
gridView.Items.CommitEdit();

Initially I got the grid displayed on the first image;
After that I change Type for selected Items to Unknown and apply the code above to each entity.
You can see on the second image what I have after that

But when I change type of these items back to Country Region and run this code again for each entity, I got a bug which you can observe on a third image. As you can see  - selection highlighting and Arrow in the row header are on different rows. Keyboard up/down navigation is broken.


Best regards,
Alexander Efimov.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Nov 2011, 01:30 PM
Hello Alexander,

 I have created a sample project following your instructions. I can confirm that the selection highlighting and Arrow in the row header are on different rows. Actually this is the expexted behavior, the Arrow in the row header shows the current item, and the highlighting shows the selected item. The current item is not the same as the salected item. If you would like them to be syncronyzed, the you should set the IsSynchronizedWithCurrentItem property of the RadGridView to "True".

At my end the keyboard navigation is working fine once the focus is back to the GridView. Is your GridView focused after you have changed the type of these items back to Country Region?

I hope that this is helpful.

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Alexander
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or