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

Changeing row/cell backgrounds of a resource

2 Answers 113 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
MfE_Developer
Top achievements
Rank 1
MfE_Developer asked on 30 May 2011, 11:36 PM

I'm trying to find a way to change the background colour of a row/cell.

Currently, our asset booking system looks like late-current.gif - whereas the red highlighted booking indicates that that resource it is overdue and hasn't been returned. What is required is for the whole row of the timeline to turn red if the asset is overdue, as indicated in late-required.gif.

The appointments change colour using the following code:

protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
     {
        DateTime now = DateTime.Now;
        if (e.Appointment.Resources.GetResource("Status", 1) != null)
           e.Appointment.CssClass = "rsCategoryOrange";

And I was trying to do something similar to change the entire row background.

Note: all the resources are populated from the database and are not hardcoded.

Any ideas anyone?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 31 May 2011, 12:22 PM
Hello Mike,

You can style the time slots conditionally based on the resource or appointments they contain. Here is a kb article that will help you get started -
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/setting-special-days-or-time-slots-in-radscheduler.aspx

Feel free to contact us if you have further questions.

Regards,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
MfE_Developer
Top achievements
Rank 1
answered on 01 Jun 2011, 03:24 AM
Cheers Peter,

I found it very difficult to work out how to get resource data from the appointment - i.e. if the resource is of booked status, etc - so I just made the appointment stretch to the present time to show the asset hadn't been returned.

Problem solved - but different method used.
Tags
Scheduler
Asked by
MfE_Developer
Top achievements
Rank 1
Answers by
Peter
Telerik team
MfE_Developer
Top achievements
Rank 1
Share this question
or