Setting the timeline to seconds

2 posts, 0 answers
  1. Montanner
    Montanner avatar
    2 posts
    Member since:
    Jan 2011

    Posted 22 Apr 2014 Link to this post

    Can someone please help me set the timeline to show continuous seconds. At the moment it resets to zero every 60 seconds but I need the time line to continue, I.E. 0 to 300 seconds?
  2. Polya
    Polya avatar
    242 posts

    Posted 23 Apr 2014 Link to this post

    Hi Montanner,

    In order to format the Ticks in a suitable way (0-300) we need to create a custom TickInterval and format it to return the total seconds difference between the current date and the start date. Hence, we need to preserve the start date somewhere so we can have it in the FormatValue method for the date difference extraction. This means, however, that the custom TickInterval should not be used as a shared resource between RadGanttViews, because the start date will be unreliable.
    In order to display 0 - 300 time ruler range we need to change the RadGanttView.VisibleRange to 300 seconds.
    To show each second in reasonable pixels we can modify the RadGanttView.PixelLength to something like 00:00:00.010.

    Please find attached a sample project demonstrating this approach. 
    Hopefully this helps and is suitable for your scenario.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top