Create a delta time column between rows

2 posts, 0 answers
  1. Clint Singer
    Clint Singer avatar
    133 posts
    Member since:
    Oct 2012

    Posted 15 Jul 2012 Link to this post


    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.


  2. Rossen Hristov
    Rossen Hristov avatar
    2477 posts

    Posted 16 Jul 2012 Link to this post


    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top