RadTreeListView sorting with ICompare?

2 posts, 0 answers
  1. Ben
    Ben avatar
    4 posts
    Member since:
    Aug 2010

    Posted 24 Jul 2013 Link to this post

    Hello,

    Is it possible to set a custom sorting for a column, using an implementation of ICompare?

    I've got a list like
    1.1
    1.5
    1.10

    With default sorting it sorts as 
    1.1
    1.10
    1.5

    Please let me know :-) Thanks in advance!

    Best regards,
    Ben
  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 26 Jul 2013 Link to this post

    Hello Ben,

    Yes, you can try to implement IComparable / IEquatable interfaces. Thus you will be able to sort the items just in the way you want. Since RadTreeListView counts on those interfaces, it will follow the logic you implement and will sort the items depending on that logic.

    For more information, you can search about implementing the IComparable<T> interface in MSDN.

    I hope this information helps.

    Regards,
    Yoan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top