search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Scheduler: Show Business hours per Ressource

Asked by stromflut
11 years ago.

It's possible to show the business hours in a different color on the scheduler diagram. But it's just configurable per calendar. We'd like to configure the business hours/different colors per row/resource. Let's say resource 1 is available from 10 to 12 am, the background color should be different from the other hours.
Is this possible in any way?

thanks!

Answer posted by Dan Letecky [DayPilot]
10 years ago.

You can change the cell background using OnBeforeCellRender method:

protected override void  OnBeforeCellRender(BeforeCellRenderArgs e)
{
  if (e.Start.Hour > 5 && e.ResourceId == "5") {
    e.BackgroundColor = "#ffffff";
  }
}

or

protected override void  OnBeforeCellRender(BeforeCellRenderArgs e)
{
  if (e.Start.Hour > 5 && e.ResourceId == "5") {
    e.CssClass = "customclass";
  }
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.