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

[Solved] Color Coding Events

3 Answers 168 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 20 Dec 2007, 04:04 PM
i noticed in the "first look" demo for the rad scheduler that events shown on the scheduler are color coded to the selected property.  how do you go about creating this color coding?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 20 Dec 2007, 04:16 PM
Hello Scott,

The appointment style is controlled with the CssClass property in the AppointmentCreated event:

 protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)  
        {  
            Resource prop = e.Appointment.Resources.GetResourceByType("Property");  
            e.Appointment.CssClass = "ID" + prop.Key.ToString();  
        }  
 
 

A related topic in the help is: Set different styles for appointments


All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Scott
Top achievements
Rank 1
answered on 20 Dec 2007, 04:18 PM
peter,

in my case i am doing an initial databind from a sharepoint list.  is there a way to set the cssclass based on a column in the bound datasource?
0
Peter
Telerik team
answered on 20 Dec 2007, 04:42 PM
Hello Scott,

You can use custom attributes to store the values of the datasource column on which the appointment styles will depend. For details, please, refer to this forum thread.


Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Scott
Top achievements
Rank 1
Answers by
Peter
Telerik team
Scott
Top achievements
Rank 1
Share this question
or