This is a migrated thread and some comments may be shown as answers.

grouping by just the date of a date/time value

3 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 29 Jun 2009, 10:21 AM
Hello

Is is possible to set up the grid grouping expressions so that they group the rows in a grid based on just the date (and not the time) of a column of type Date?

I presume one option will be to solve the problem at the actual data source by creating a view which returned an extra column containing only the date part of the date/time data. I could then group on this field.

Is there any way I can achieve this with the grid itself?

thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Jun 2009, 11:52 AM
Hi,

You may go through the  following forum link which discusses a similar requirement.
Grouping on Date, ignoring Time

Shinu
0
andieje
Top achievements
Rank 1
answered on 29 Jun 2009, 02:25 PM
Hi

Thanks for the link but it didn't help. There is a solution through that link which involves manipulating the database directly which is what I suggested in my original post. I was wondering if the radgrid could do this directly but perhaps not.

thanks
0
Yavor
Telerik team
answered on 02 Jul 2009, 07:02 AM
Hello andieje,

Unfortunately, the control cannot handle this behavior automatically, since it groups on the database level.
Thus, you can either separate the data in the database, or come up with an intermediate helper class, which will be bound to the grid, and handle this separation.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
andieje
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
andieje
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or