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

Convert DateTime to Date for Listview group header

1 Answer 147 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 24 Aug 2013, 02:53 PM
Hi,

I am binding a Listview to a service which has a datetime field through a DataSource. I'd like to use the date part of that field as the group header of the list view items so that items with same date value are grouped under the same header. How can I set the DataSource's group property to date part of this field only (group by date only) ?

Regards
Ron Farko

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 28 Aug 2013, 07:42 AM
Hello Ron,

The ListView does not support grouping out of the box and creating templates that handle it would be pretty complex.

Also you cannot group the dataSource in such way that it neglects the time part of a date, other than that you will need to create projection (map) and clear that time part before passing the collection to the dataSource.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Ron
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or