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

Coloring the appoinment

1 Answer 44 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
vairam
Top achievements
Rank 1
vairam asked on 10 Jul 2009, 01:40 PM
Hi

I have startTime ,EndTime,count and Title Column in my datatable.
What i want is depentds on the count i want to change the color of Appoinment.
How can i acheive this?

Regards
Vairamuthu

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 14 Jul 2009, 11:53 AM
Hello Vairamuthu,

Tryout the following code anippet in order to apply style for appointment based on condition.

CSS:
 
<style type="text/css">  
.RadScheduler .MyCustomAppointmentStyle .rsAptContent  
{  
    background-colorgreen;  
    background-imagenone;  
}      
</style> 

C#:
 
protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)  
{  
    DataRowView dataRow = (DataRowView)e.Appointment.DataItem;  
    if (dataRow["count"].ToString() == "4"// Check for the condition  
    {  
        e.Appointment.CssClass = "MyCustomAppointmentStyle";  
    }  

Go through the following link to know more on applying styles for appointments.
Setting styles for appointments

Thanks,
Princy.
Tags
Scheduler
Asked by
vairam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or