Appointment styles

5 posts, 0 answers
  1. chinnu
    chinnu avatar
    21 posts
    Member since:
    Aug 2011

    Posted 04 Feb 2012 Link to this post

    Hi

    I need a requirement like ,I need to show a particular duration having appointment in a particular color.I mean I dont want to show the appointment name or I dont want to see it like a projected section.I just want to show a light green color to indicate that an appointment has beed scheduled in the particular duration.

    For eg : If an appointment is given for 9 to 9.20 I dont want to show it as a projection.I just need the section as such empty ,but with a different colour.Just to indicate that the particular timing has an appointment scheduled.

    I searched a lot .But all search ends with giving cssclass/colour to the appointment given.I dont want that type.I just want to show the given appointment duration with different colour.I dont want to show a projected appointment block.Just need a colour change in the whole duration or time slot.This must be shown whether the user selects day,week or month type view.

    Any help is appreciated..
    Regards
    Chinnu :)
  2. chinnu
    chinnu avatar
    21 posts
    Member since:
    Aug 2011

    Posted 08 Feb 2012 Link to this post

    Helloooo

    No one knows the answer????.............

    Chinnu
  3. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 08 Feb 2012 Link to this post

    Hi,

    You could subscribe to the TimeSlotCreated server-side event and set CSS classes to the TimeSlots for  which appointments are arranged.

    Example:
    protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)
    {
        if (e.TimeSlot.Appointments.Count > 0)
        {
            foreach (Appointment item in e.TimeSlot.Appointments)
            {
                item.CssClass = "Hidden";
            }
            e.TimeSlot.CssClass = "Disabled";
        }
    }
    <style type="text/css">
        .Disabled
        {
            background-color: Olive;
        }
         
        .Hidden
        {
            visibility: hidden;
        }
    </style>
    <telerik:RadScheduler runat="server" ID="RadScheduler1" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated">
    </telerik:RadScheduler>

    I hope this helps.

    Greetings,
    Ivana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  4. chinnu
    chinnu avatar
    21 posts
    Member since:
    Aug 2011

    Posted 09 Feb 2012 Link to this post

    Hi

    Thank you for the reply.

    This is ok.
    But a problem is there.
    My scheduler minutesperrow is 5
    It is if an appointment is from 8.00 to 8.10 , the colour extends only from 8.00 to 8.05 means that time slot only.
    How can I solve this.Please help.

    Regards
    Chinu
  5. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 14 Feb 2012 Link to this post

    Hi,

    You could try the following:

    protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)
    {
        IList<Appointment> appt = RadScheduler1.Appointments.GetAppointmentsInRange(e.TimeSlot.Start, e.TimeSlot.End);
             
        if (appt.Count > 0)
        {
            e.TimeSlot.CssClass = "Disabled";
        }
    }
    This approach, however, has its limitation when an all-day appointment is created. You could refer to the following KB article for more information how to set special TimeSlots in RadScheduler:

    Setting special days or time slots in RadScheduler.


    I hope this helps.

    Greetings,
    Ivana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top