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

Clicking of appointment slot

3 Answers 98 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 15 Mar 2016, 03:35 PM
I want to be able to achieve a scnerio where the user will click the apointment slot in rad scheduler and then autopopulate the fields i have futher down my form is their a way to have like a reserved status of the slot until the apointment is properly booked?.

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 18 Mar 2016, 12:30 PM
Hello Philip,

With the Scheduler's StartEditingInAdvancedForm property set to "true" double clicking on a time slow will open the advanced insert form. If you subscribe the control for the OnFormCreating server-side event it will fire prior to the insert form opening and you would be able to set the Appointment's data, for example the Subject and Description fields and the resources (User and Room in the example) values:
protected void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
{
    if (e.Mode == SchedulerFormMode.AdvancedInsert)
    {
        e.Appointment.Description = "Appointment Predefined Description";
        e.Appointment.Subject = "Appointment Predefined Subject";
        e.Appointment.Resources.Add(RadScheduler1.Resources.GetResourcesByType("User")[0]);
        e.Appointment.Resources.Add(RadScheduler1.Resources.GetResourcesByType("Room")[0]);
    }
}

As for the slot's "reserved" status, I am not sure what that is aimed at. Do you want to color some of the slots differently to make them distinguishable from other "non-reserved" slots?

Regards,
Ivan Danchev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Philip
Top achievements
Rank 1
answered on 19 Mar 2016, 06:37 PM
Yes that is correct Ivan its to do with shift patterns so we can show what shifts that a certain member of staff can show their availability , also in reference to this is their any way of hidden Saturday and Sunday columns.
0
Ivan Danchev
Telerik team
answered on 23 Mar 2016, 02:02 PM
Hello Philip,

You can review the logic in the Scheduler's TimeSlotCreated server-side event handler in the Customizing the Time Slots demo. It shows how different css classes can be set to the time slots based on specific conditions and custom styles can be applied to them using these classes as selectors (styles.css).

As for hiding the Saturday and Sunday columns, there is no built in functionality that allows that but you can achieve it with CSS:
html .RadScheduler .rsSunCol, .rsSatCol {
    display: none;
}
 
html .RadScheduler .rsHorizontalHeaderTable th:first-of-type,
html .RadScheduler .rsHorizontalHeaderTable th:last-of-type,
html .RadScheduler .rsAllDayRow td:first-of-type,
html .RadScheduler .rsAllDayRow td:last-of-type {
    display: none;
}


Regards,
Ivan Danchev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler
Asked by
Philip
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Philip
Top achievements
Rank 1
Share this question
or