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

Multiple Sorting

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rene
Top achievements
Rank 1
Rene asked on 20 Oct 2016, 08:03 AM

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

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 24 Oct 2016, 11:48 AM
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!
Tags
GridView
Asked by
Rene
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or