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

Create a delta time column between rows

1 Answer 84 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.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 16 Jul 2012, 04:47 AM
Hi,



I have started looking into using the RadDataServiceDataSource and have followed the MVVM example which actually just uses the QueryableDataServiceCollectionView and I am trying to come up with a way to create calculated columns which contain the time delta between two adjacent rows using the DateTime from one of the columns.  So basically if the DateTime between a row and its next row was 1 day, then the delta would show that. 



I am wondering if anyone has some ideas how I could do this without creating a wrapper object because that seems to cause some issues with my ability to use the DataService query directly while still being able to rely on the DataPager as I would be changing the underlying objects and collections.



The original data doesn't have deltas pre calculated because filtering changes what rows are adjacent and I would want to calculate the deltas between those the same way as if the data was contiguous.



What would be ideal is that even though I am using paging it still brings back an extra "hidden" row to be used in the delta calculation as if it was contiguous with the following page.



Cheers,

Clint

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 16 Jul 2012, 08:58 AM
Hi,

We are afraid that we cannot think of a possible implementation of so custom scenario with so many custom requirements with our controls. You could calculate the deltas on the server -- but you can't do that because of filtering. When there is paging, you only get the current page of data on the client -- nothing else, so the first row of a page will not have "previous" row -- it is not on the client.

I am afraid that we don't know how these requirements can be implemented with Telerik controls. Maybe your best shot would be a completely custom solution built from scratch that would be specifically designed for your specific requirements.

Regards,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or