Table with row for each date between two dates

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Nov 2018

    Posted 23 Nov 2018 Link to this post

         So I've got a datasource that gives me a startdate and an enddate value. I was wondering is there a way for me to make a table that essentially goes:


    |       Date        | Col1 | Col2 | Col3 |
    | 10th January 2018 |      |      |      |
    | 11th January 2018 |      |      |      |
    | 12th January 2018 |      |      |      |


    For example?

  2. Todor
    Todor avatar
    520 posts

    Posted 26 Nov 2018 Link to this post

    Hi Michael,

    It will be necessary to expand the datasource to include all the Dates that should be displayed in the Table. This can be done with an ObjectDataSource that receives as arguments startdate and enddate and returns all the dates between them. Along with the list of dates you may return also other information.

    I have attached a sample project demonstrating the approach. Note that the start/end dates are Report Parameters that get passed as arguments of the ObjectDataSource DataMember. The dates can come also from another datasource.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top