Time interval in radscheduler

6 posts, 0 answers
  1. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2012 Link to this post

    In my Radscheduler I am giving 15 minutes interval with MinutesPerRow="15"  and the time panel shows time as 8:00 am,8:30 am,9:00 am etc  even though there is 15 min interval in between.

    How can I show 8:00 am,8:15 am,8:30 am etc in the scheduler time panel so that user can easily distinguish the time interval.

    Thanks,
    Soumya
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Sep 2012 Link to this post

    Hi Soumya,

    Try the following code snippet to achieve your scenario.

    C#:
    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
        {
            if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))
            {
                RadTimePicker startTime = e.Container.FindControl("StartTime") as RadTimePicker;
                startTime.TimeView.Interval = new TimeSpan(0, 15, 0);
                startTime.TimeView.DataList.DataSource = null;
                startTime.DataBind();
     
                RadTimePicker endTime = e.Container.FindControl("EndTime") as RadTimePicker;
                endTime.TimeView.Interval = new TimeSpan(0, 15, 0);
                endTime.TimeView.DataList.DataSource = null;
                endTime.DataBind();
            }
        }

    Hope this helps.

    Regards,
    Princy.
  3. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2012 Link to this post

    Hi Princy,
    I need to show the time as 8:00 ,8:15,8:30 in the scheduler.
    Please find attached screenshot.

    Thanks,
    Soumya
  4. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 03 Sep 2012 Link to this post

    Hello Soumya,

    In the Time Span between 8:00 and 8:30, actually there are 2 rows and the calculation is correct(2*15 = 30).
    At the same time it must be an integer, so specifying the MinutesPerRow="7.5" is not an option.

    Greetings,
    Helen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Soumya
    Soumya avatar
    108 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2012 Link to this post

    Yes there are 2 rows.
    My question is whether it is possible to show the time for each row as  '8:00 am,8:15 am,8:30am'  instead of '8:00 am,8:30 am' ?


  6. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 05 Sep 2012 Link to this post

    Hi Soumya,

    You can use the MinutesPerRow property and TimeLabelRowSpan. There is a demo - http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx

    Also refer to the following forum post which discusses a similar problem:

    http://www.telerik.com/community/forums/aspnet-ajax/scheduler/display-time-slot-like-7-00-7-15-7-30-7-45-8-00-in-scheduler-control.aspx

    Greetings,
    Helen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top