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

Set parent resources background color

Asked by Matteo
12 years ago.

Is there a way to customize the resources appearence in the scheduler?
In detail, I would like to put some kind of style on the parent resource cells (the ones with children.Count==0), like the background color or some text propriety (like "bold").

I've tried to implement the feature using the BeforeResHeaderRender event, but it doesn't work:
Resource r = DayPilotScheduler1.Resources.FindByValue(e.Value);
if (r.Children.Count > 0)
e.BackgroundColor = "#73B1B7";

Thank you!

Comment posted by Dan Letecky [DayPilot]
12 years ago.

Are you using CssOnly = true mode?

Comment posted by Matteo
12 years ago.

Yes, I would like to use the new scheduler_white theme.
So I guess the problem is about that: if I use one of the themes coming with the last release, I will not be able to customize the cells because the style applied while rendering will override all the proprieties. Instead if I disable the CssOnly mode all the customized cells will lost the css.
Sounds right?
Thank you for the answer.

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

This ability to customize cells is not yet implemented in the CssOnly mode.

It will be available in the next release:

http://www.daypilot.org/daypilot-pro-for-asp-net-webforms-7-1.html

As soon as it is implemented (it will be in a few days) it will be published in the sandbox:

http://www.daypilot.org/sandbox/

Comment posted by Dan Letecky [DayPilot]
12 years ago.

BeforeCellRender/e.BackgroundColor is now supported in CssOnly mode.

The parent cells are now marked with _.prefix_cellparent_ class automatically. It might be easier to define a style for this class than to apply the background color manually.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.