Customized scheduler

4 posts, 0 answers
  1. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2011

    Posted 18 Jan Link to this post

    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
  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    835 posts

    Posted 20 Jan Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2011

    Posted 21 Jan in reply to Ivan Danchev Link to this post

    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.
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    835 posts

    Posted 26 Jan Link to this post

    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
Back to Top