Duration/Interval TimeSpan column - filter

5 posts, 0 answers
  1. Stéphane
    Stéphane avatar
    15 posts
    Member since:
    Sep 2010

    Posted 08 Jan 2013 Link to this post


    I need to show TimeSpan values in a grid with sorting and filtering. Sorting is OK but filtering is not OK. I tested many ways but none worked.

    <MasterTableView AllowCustomPaging="false" AllowFilteringByColumn="true">
      <telerik:GridBoundColumn DataField="Duration" HeaderText="Duration" UniqueName="Duration" />
      <telerik:GridDateTimeColumn DataField="Duration" HeaderText="Duration" UniqueName="Duration" PickerType="TimePicker" DataType="System.TimeSpan" />
    Any solution ?

    Thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jan 2013 Link to this post


    I suppose you want to enable the range filtering function for GridDateTimeColumn. Try setting EnableRangeFiltering property for the specific column to true.

  3. Stéphane
    Stéphane avatar
    15 posts
    Member since:
    Sep 2010

    Posted 09 Jan 2013 Link to this post


    Thanks for your response. No it isn't this functionality I look for.

    I display TimeSpan values in my column (without date part) (00:03:12, 4.10:15:47, 07:59:59, ...), and I want these filters by exemple :
    • greater than 01:00:00
    • equal to 00:15:00
    • smaller or equal to 00:01:00
    • ...


  4. Jared
    Jared avatar
    5 posts
    Member since:
    Oct 2014

    Posted 07 May 2015 Link to this post

    Any more thoughts on implementing this feature?  This is something I'm interested in adding to our website's grids.  I haven't jumped into yet so any direction would be helpful.  
  5. Kostadin
    Kostadin avatar
    1733 posts

    Posted 12 May 2015 Link to this post

    Hi Jared,

    The GridDateTimeColumn is using picker controls to select date and they are bound to a DateTime object. Because of this you are seeing the error when trying to filter column bound to a TimeSpan.
    Note that in this case you would need to handle the filtering manually. You could use an approach similar to the one described in this article.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top