We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Grouping Engine - Sort By Group Count

Thread ID:





42569 Mar 31,2006 07:28 PM Apr 11,2006 07:53 PM Windows Forms 6
Tags: Grouping
Brian Schlatter
Asked On March 31, 2006 07:28 PM

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

Administrator [Syncfusion]
Replied On April 3, 2006 02:40 AM

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

Administrator [Syncfusion]
Replied On April 3, 2006 02:43 AM

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

Jayakumar Natarajan [Syncfusion]
Replied On April 4, 2006 05:22 PM

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

Brian Schlatter
Replied On April 6, 2006 06:07 PM

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

Administrator [Syncfusion]
Replied On April 10, 2006 03:12 AM

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.


Brian Schlatter
Replied On April 11, 2006 07:53 PM

Perfect. Thank you very much Calvin.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.