I'm creating a xamDataGrid that groups by a name column. This works perfectly, but the sort order on the group headers seems to be alphabetical and applying a sort order by the date column only sorts the rows within the groups, it doesn't re-order the group headers themselves into date order.
Is there any way to do this or am I heading down a dead-end?
Hi Stefan,
DescriptionWithSummaries has just the description(ex. "27,175.00 (1 item)") and not the totals, as i am setting teh GroupBySummaryDisplayMode to "SummaryCellsAlwaysBelowDescription" and not text . I tried iterating the child records but they too just have the descriptions.
Thnx
Jaffar
Hello Jaffar,
You can use the following code, where “gbr” is the GroupByRecord:
int result; var summary = gbr.DescriptionWithSummaries.TrimStart(gbr.Description.ToCharArray()).Split(new char[]{' ',','}); for (int i = 0; i < summary.Length; i++) { if (summary[i] == "Count") { result = Int32.Parse(summary[i + 2]); } }
Hope this helps you.
Hi,
I have groupings with the totals displaying in the group headers for all the numeric columns(ex col2, col3, col4) and group by is applied on col1 and colm5. If I sort by col2, I need the group by header to sort based on the totals for col2 on the group header. If i use custom GroupByComparer, it gives me GroupByRecord object for comparision, GroupByRecord object has just the description and not the cells by summary values(totals on the header) which I can use for sort comparision. How can I get the Totals on each of the group header from GroupByRecord.
I have used this GroupByComparer example to achieve groups are then sorted by record count using a checkbox. However, if filtering is also allowed and the user puts any kind of filtering on the data, the sort by count will not be in the correct order.
Is there any suggestion or explanation you can give to allow grouping and sorting by count both with filters?
Thanks,
//abissette