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

Appointment BackColor does not work on Year and Agenda views

1 Answer 23 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 1
Olivier asked on 21 Feb 2017, 04:44 PM

Hi,

I have the following code : 

 protected void RadScheduler_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
           

            if (true)
            {
                e.Appointment.BackColor = = Color.Yellow;

            }

            else

            {

              e.Appointment.BackColor = = Color.Red;

            }

}

 

that example works fine on the following views :

- Day View.

- Week View.

- Month View.

But it does not work on the Year view and the Agenda view ! 

So, how can i make it work ?

 

Best regard.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 24 Feb 2017, 09:54 AM
Hello Oliver,

I am pasting my answer here from the duplicate support thread.

The Year and Agenda view have different rendering that the other views.

In Year view, the Appointment color customization is not supported out of the box. You could review the following article for guidelines on how this could be achieved: Appointments colors shown in year view.

In Agenda view, the Appointment color customization could be achieved by using templates, with approach similar to the one in the Scheduler - Appointment Editing demo and set CSS classes to one of the inner elements - How to change the CSS class for a div in code-behind?.

Regards,
Peter Milchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Olivier
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or