Problem with sorting in grid view

2 posts, 0 answers
  1. Lakshman
    Lakshman avatar
    8 posts
    Member since:
    Dec 2016

    Posted 10 Feb Link to this post

    I have a grid view with the integer column sorted ascending by default.

    At this time, for other event, I am updating this integer column and the values are getting modified in the UI correctly.

    But at this case, the sorting is not getting applied correctly.

    For example, By default my UI is like below

    1

    2

    3

    I have updated the row with value 2 with 5. Then my UI becomes

    1

    5

    3

    instead of 

    1

    3

    5

     

    Please let me know, how to achieve this.

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    444 posts

    Posted 14 Feb Link to this post

    Hi Lakshman,

    As advised in the Data Operations like filtering, sorting or grouping are not re-evaluated article, the reason for this behavior is that a CollectionChanged event of the bound source collection is not raised. You need to make sure that such event is raised so that the grid reapply the data operations. Please try the approach from the Edit an item outside RadGridView article and update the thread whether it will work for you. 

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top