Click here to Skip to main content
Sign Up to vote bad
good
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:12
Edited 5 Dec '12 - 1:17


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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 483
1 Arun Vasu 315
2 OriginalGriff 250
3 Maciej Los 218
4 Aarti Meswania 170
0 Sergey Alexandrovich Kryukov 9,680
1 OriginalGriff 7,539
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid