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

Customized scheduler

3 Answers 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Jan 2016, 07:21 AM
Hello,

I need to customize the Telerik RadScheduler, for that I have some questions,
1. How to customize the time in 24 Hrs clock in the given screenshot?
     For Example, time  8:00 am to 8:30 am
                                   ......
                                   ......
                                  7:00 am to 7:30 am
2. How to add customize control like Radio button, Checkbox etc. in the appointment/scheduler  control?
3. How to retain the value for added customized controls after navigating away and coming to the same page?
4. Is there any to change the locations of controls in appointment? like placing "Recurring", "All Day" etc. at different location on the form.

Kindly provide the resolution as early as possible.

Thank you

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 20 Jan 2016, 04:35 PM
Hello Mark,

The DatePicker's Start and EndTime in the Insert/Edit form can be customized by subscribing to the Scheduler's FormCreated event and setting the corresponding properties in its handler, as shown below:
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.EndTime = new TimeSpan(20, 0, 0);
        startTime.TimeView.DataList.DataSource = null;
        startTime.DataBind();
 
        RadTimePicker endTime = e.Container.FindControl("EndTime") as RadTimePicker;
        endTime.TimeView.EndTime = new TimeSpan(20, 0, 0);
        endTime.TimeView.DataList.DataSource = null;
        endTime.DataBind();
    }
}

The code above will set 7:30 pm as the last selectable hour in both pickers. Note 7:30 am (of the next day) cannot be displayed as EndTime.

For customizing the form by adding controls to it you can see our Customize the Advanced Form Template
documentation article and the following demo, which explain and demonstrate how you can add controls to the form and bind them so they retain their value.

The controls in the form can be re-arranged. This can be done by moving the control and its respective container, for example the All Day checkbox, from one place within the AdvancedForm.ascx to another.
<li class="rfbRow rfbCompactRow rfbNoLabel rsAllDayWrapper">
    <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
</li>

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 22 Jan 2016, 05:31 AM
Hello Ivan ,

Thank very much for you reply.

We also facing one difficulty while disabling the built-in validation message shown in screenshot.
The error message comes on clicking the Start Time, End Time and All Day field.
We want to disable the validation message. Could you please help me in that?

Thank you.
0
Ivan Danchev
Telerik team
answered on 26 Jan 2016, 01:58 PM
Hello Mark,

Although removing the message is possible by customizing the the AdvancedForm.ascx user control if you attempt to save an appointment that does not fulfill the requirement for EndDate/EndTime to be after StartDate /StartTime respectively, a server exception will be thrown, because such an appointment would be invalid and cannot be inserted/updated.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
Mark
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Mark
Top achievements
Rank 1
Share this question
or