Click here to Skip to main content
11,648,785 members (88,146 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 F-ES Sitecore 419
1 CPallini 410
2 Kornfeld Eliyahu Peter 330
3 OriginalGriff 324
4 Sergey Alexandrovich Kryukov 254
0 OriginalGriff 1,512
1 Sergey Alexandrovich Kryukov 1,022
2 jyo.net 994
3 DamithSL 986
4 CPallini 945


Advertise | Privacy | Mobile
Web03 | 2.8.150804.4 | 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