Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Scheduler > Appointment styles

Not answered Appointment styles

Feed from this thread
  • chinnu avatar

    Posted on Feb 4, 2012 (permalink)

    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 :)

    Reply

  • chinnu avatar

    Posted on Feb 8, 2012 (permalink)

    Helloooo

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

    Chinnu

    Reply

  • Ivana Ivana admin's avatar

    Posted on Feb 8, 2012 (permalink)

    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 >>

    Reply

  • chinnu avatar

    Posted on Feb 9, 2012 (permalink)

    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

    Reply

  • Ivana Ivana admin's avatar

    Posted on Feb 14, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Scheduler > Appointment styles
Related resources for "Appointment styles"

ASP.NET Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial ]