Multiple Sorting

2 posts, 0 answers
  1. Rene
    Rene avatar
    1 posts
    Member since:
    Feb 2014

    Posted 20 Oct Link to this post

    Hi,

    i use a RadGridView bound to a ObservableCollection<Calls> with some Columns like Name, Number, Date, Time,...

    The Column "Date" ist declared as DateTime in my ViewModel and the Column "Time" is a string. I have to sort my
    Collection by Date and Time:

    Comin from log:

    Prusik#4862416#8:30#20.10.2016#incoming.png#(284,1,0)
    Prusik#4862416#8:40#20.10.2016#incoming.png#(284,1,0)
    Prusik#4862416#8:50#20.10.2016#incoming.png#(284,1,0)
    Golf & Thermenresort Stegersbach GmbH#06803280292#14:00#19.10.2016#incoming.png#(16364,0,0)
    Golf & Thermenresort Stegersbach GmbH#06803280292#13:00#19.10.2016#incoming.png#(16364,0,0)

    Should be sorted to

    Prusik#4862416#8:50#20.10.2016#incoming.png#(284,1,0)
    Prusik#4862416#8:40#20.10.2016#incoming.png#(284,1,0)
    Prusik#4862416#8:30#20.10.2016#incoming.png#(284,1,0)
    Golf & Thermenresort Stegersbach GmbH#06803280292#14:00#19.10.2016#incoming.png#(16364,0,0)
    Golf & Thermenresort Stegersbach GmbH#06803280292#13:00#19.10.2016#incoming.png#(16364,0,0)

    What is to do to geht thisrunning?

    And i also want to insert a new incoming call on top of the RadGridView?

    Thanks a lot
    Best Regards
    Rene

  2. Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 24 Oct Link to this post

    Hello Rene,

    To achieve the desired behavior, please take a look at our Programmatic Sorting article but instead to add just one ColumnSortDescriptor in SortDescriptors collection to add for both columns.

    I hope that this helps.

    Regards,
    Martin Vatev
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top