This is a migrated thread and some comments may be shown as answers.

Time interval in radscheduler

5 Answers 159 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Soumya
Top achievements
Rank 1
Soumya asked on 03 Sep 2012, 06:28 AM
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

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Sep 2012, 08:11 AM
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.
0
Soumya
Top achievements
Rank 1
answered on 03 Sep 2012, 08:18 AM
Hi Princy,
I need to show the time as 8:00 ,8:15,8:30 in the scheduler.
Please find attached screenshot.

Thanks,
Soumya
0
Helen
Telerik team
answered on 03 Sep 2012, 10:52 AM
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.
0
Soumya
Top achievements
Rank 1
answered on 03 Sep 2012, 11:03 AM
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' ?


0
Helen
Telerik team
answered on 05 Sep 2012, 01:44 PM
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.
Tags
Scheduler
Asked by
Soumya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Soumya
Top achievements
Rank 1
Helen
Telerik team
Share this question
or