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

Table with row for each date between two dates

1 Answer 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 23 Nov 2018, 11:48 AM

     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?

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 26 Nov 2018, 04:10 PM
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.

Regards,
Todor
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
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or