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.
Syncfusion Feedback

GGC and Group only By Date

Thread ID:

Created:

Updated:

Platform:

Replies:

70372 Dec 10,2007 10:30 AM UTC Dec 10,2007 12:52 PM UTC Windows Forms 2
loading
Tags: GridControl
Alexander Schlicht
Asked On December 10, 2007 10:30 AM UTC

Hello

Is there a way to group in a GCC only by the date not the time of a DateTime value of a field?

(e.g.
01.01.2007 10:34:45,
01.01.2007 11:21:27,
01.01.2007 14:11:17
to one group)


Greetings
Alexander


Administrator [Syncfusion]
Replied On December 10, 2007 10:56 AM UTC

One way to do this is to use a custom IGroupCategorizer object that ignores the time portion of the values in the column. You can use the grid.TableDescriptor.GroupedColumns.Changing event to catch the action of a column being grouped, and there set the categorizer property of the sort descriptor to be your custom categorizer. Here is a little sample showing how you might do this.



GroupByDate.zip

Alexander Schlicht
Replied On December 10, 2007 12:52 PM UTC

Hi Clay Burch!

Your sample works fine.
Thanks for your quick help.

Alexander




CONFIRMATION

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.

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

;