RadScheduler Custom TimeScale of 5 minutes

2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Sep 2014

    Posted 05 Sep 2014 Link to this post

    Hi,

    I am evaluating the RadScheduler using the Timeline view to display a 24 hour range.
    All the scheduled activities occur in 5 minute increments (00:00, 00:05, 00:10, 00:15 etc).

    Right now the RadScheduler shows 15 minutes as the minimum timescale for display.

    Can I create a custom timescale that would get me down to 5 minutes?

    Thanks.

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 10 Sep 2014 Link to this post

    Hello John,

    Thank you for writing.

    You can create a derivative of the MinutesTimescale and override its ScalingFactor property to five minutes. Here is a sample implementation:
    public Form1()
    {
        InitializeComponent();
     
        this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline;
        SchedulerTimelineView timelineView = this.radScheduler1.GetTimelineView();
        FiveMinutesTimescale fiveMinutes = new FiveMinutesTimescale();
        timelineView.SchedulerTimescales.Add(fiveMinutes);
        fiveMinutes.Visible = true;
     
    }
     
    public class FiveMinutesTimescale : MinutesTimescale
    {
        public override int ScalingFactor
        {
            get
            {
                return 5;
            }
        }
    }

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     
    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.
     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top