Updating groups leads to invalid state

2 posts, 0 answers
  1. Alexander
    Alexander avatar
    21 posts
    Member since:
    Jun 2011

    Posted 31 Oct 2011 Link to this post

    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.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Nov 2011 Link to this post

    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 >>

Back to Top