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

RadGridView grouping by DateTime column

3 Answers 227 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Junior Dev
Top achievements
Rank 1
Junior Dev asked on 07 Aug 2012, 09:08 PM
Hello, 
Sorry for my english skill, i hope you will understand


I have RadGridView with some columns, in one of them is DateTime data. When i drag DateTime column to the GridViewGroupPanel and After dropping the selected header in the grouping area  the data in theRadGridView is grouped by DateTime:
(01/01/2012 09:22:29 (Total 1)
(01/01/2012 09:23:29 (Total 1) 
....
(01/01/2012 09:30:29 (Total 1) 


Question: Can i somehow change this default grouping descriptor to group these data only by Date ?


3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Aug 2012, 05:48 AM
Hi,

 You can bind this column only to the Date part of the DateTime. For example:

<telerik:GridViewDataColumn DataMemberBinding="{Binding MyDateTime.Date}" ...

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Junior Dev
Top achievements
Rank 1
answered on 08 Aug 2012, 06:10 AM
Hi Vlad,
Thanks for the answer, but i need time also in my GridViewDataColumn, but grouping without it. It is posible ?
0
Vlad
Telerik team
answered on 08 Aug 2012, 06:11 AM
Hello,

 You can define CellTemplate/CellEditTemplate where you can place desired binding with full DateTime.

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Junior Dev
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Junior Dev
Top achievements
Rank 1
Share this question
or