Clicking of appointment slot

4 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 15 Mar Link to this post

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

    Posted 18 Mar Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 19 Mar in reply to Ivan Danchev Link to this post

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

    Posted 23 Mar Link to this post

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