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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customized Grouping

Thread ID:





57064 Feb 25,2007 10:29 PM UTC Feb 26,2007 07:20 PM UTC WinForms 1
Tags: GridControl
Asked On February 25, 2007 10:29 PM UTC


My table has a System.DateTime column. When grouped by this column, I would like it to group by date only (i.e. ignore the time). I found the 'How To' article showing a custom group and it works fine but I would like to override the default behaviour when the user drags the Date comumn to grouping area. The example creates a new custom group and dragging the Date column header to group area causes the same default behaviour. How do I custome the grouping behaviour for a column?

Thanks - Joel

Administrator [Syncfusion]
Replied On February 26, 2007 07:20 PM UTC

Hi Joel,

One way you can do this by adding your own custom Categorizer object to the SortColumnDescriptor. Once the column is grouped, the custom Categorizer is used to determine which adjacent records in the column belong to the same group. To create custom Categorizer objects, you define classes that implement ICategorizer (two methods). Please refer to the atttached sample and let me know if this helps.

private void GroupedColumns_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
if( e.Action == Syncfusion.Collections.ListPropertyChangedType.Insert)
SortColumnDescriptor column = e.Item as SortColumnDescriptor;
if( column.Name == "DateTime")
column.Categorizer = new CustomCategorizer();

Sample : CustomizedGrouping.zip

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon