Grouping Engine - Sort By Group Count
Hi,
Is it possible to sort individual groups by the number of records they hold?
I''m using a Syncfusion.Grouping.Engine and have added a group like:
engine.TableDescriptor.GroupedColumns.Add("EventName");
I''m trying to build a histogram of all the "EventName" counts but I need the chart do be displayed in decending order. Is this possible?
Thanks,
Brian
SIGN IN To post a reply.
6 Replies
AD
Administrator
Syncfusion Team
April 3, 2006 06:40 AM UTC
Hi Brain,
Thanks for being patient. Currently there is no in-built support for this type of sorting. To achieve this, you will have to use custom sorting. Please refer to this article for more details. I will work out a sample and update you on it soon.
Best regards,
Madhan
AD
Administrator
Syncfusion Team
April 3, 2006 06:43 AM UTC
Hi Brain,
Sorry for the broken link. Here is the path for the article [ www.syncfusion.com/Support/article.aspx?id=10507 ].
Best regards,
Madhan
JN
Jayakumar Natarajan
Syncfusion Team
April 4, 2006 09:22 PM UTC
Hi Brain,
You can acheive this by SortBySummaryInCaption approach. Please refer this shipping sample - Windows\Grid.Grouping.Windows\Samples\SortBySummaryInCaption. This sample lets you have a summary in caption and sort by the summary. You can have the "Count" as summary and not show the count in the caption. It will be grouped and sorted by record count. Please refer the attached sample.
Best regards,
Jay
forumm_42569.zip
BS
Brian Schlatter
April 6, 2006 10:07 PM UTC
Thanks for the help but this was not exactly what I was looking for.
I am strictly using a Syncfusion.Grouping.Engine object to filter and sort data internally. I am not using a GridControl of any sort. I wish to group the engine on a particular attribute of the datasource and sort the engine based on the number of values within each group. Can this be done with the Syncfusion.Grouping.Engine object? After sorting the groups based on their count, I''d like to show a chart (using your ChartControl) with the X-Axis being the group''s category and the Y-Axis displaying the number of elements within that group.
Is this possible?
Thanks again,
Brian
AD
Administrator
Syncfusion Team
April 10, 2006 07:12 AM UTC
Hi Brain,
I am sorry for the delayed response. The groups can be sorted by its record count by specifying our own custom comparer to the sortColumnDescriptor.GroupSortOrderComparer. Sample attached.
Regards,
Calvin.
42569.zip
42569.zip
BS
Brian Schlatter
April 11, 2006 11:53 PM UTC
Perfect. Thank you very much Calvin.
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
BS Brian Schlatter
- Apr 1, 2006 12:28 AM UTC
- Apr 11, 2006 11:53 PM UTC