Convert DateTime to Date for Listview group header

2 posts, 0 answers
  1. Ron
    Ron avatar
    14 posts
    Member since:
    Jan 2013

    Posted 24 Aug 2013 Link to this post


    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) ?

    Ron Farko

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 28 Aug 2013 Link to this post

    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
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top