Click here to Skip to main content
11,709,536 members (49,040 online)
Rate this: bad
good
Please Sign up or sign in to vote.
Hi...
I have a WPF Datagrid which I've grouped by a column ProductName. I want to perform sorting on UploadDate which is a datefield. The issue here is on clicking on sort I want the data to be sorted on UploadDate within the groups, by the datagrid sorts the data based on the ProductName, on which I've grouped the rows. Due to this the groups are re-ordered.

How can I stop the default sorting on group name????

Example

I have a datagrid with 2 groups and I've grouped them on ProductName
Group 1 : BProduct ---> This is the Product Name
There are 2 rows in this group
04/31/2012
01/31/2012

Group 2 : AProduct ---> This is the Product Name
There are 2 rows in this group also.
04/31/2012
01/31/2012

On Sorting I want the data to sort within groups, the result I expect is

Group 1 : BProduct
There are 2 rows in this group
01/31/2012
04/31/2012

Group 2 : AProduct
There are 2 rows in this group also.
01/31/2012
04/31/2012

But the datagrid sorts on group name as well....the actual result is

Group 1 : AProduct
There are 2 rows in this group
01/31/2012
04/31/2012

Group 2 : BProduct
There are 2 rows in this group also.
01/31/2012
04/31/2012
Posted 5-Dec-12 1:12am
Edited 5-Dec-12 1:17am
(no name)43.9K
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 525
1 OriginalGriff 250
2 Peter Leow 219
3 Maciej Los 185
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100