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

Change color of some resource divider

Asked by Anonymous
5 months ago.

I want to separate rows, how can I change the color of the scheduler resource divider?

regards

Answer posted by Dan Letecky [DayPilot]
5 months ago.

Unfortunately the divider div is not part of the resource header element so you can't control it using resource properties. However, you can hide the default divider and use a bottom border of the row header cell to change the color.

You can set custom css class for rows using BeforeResHeaderRender and set individual color like this:

.aspx
<div id="dp">
  <DayPilot:DayPilotScheduler ... OnBeforeResHeaderRender="DayPilotScheduler1_BeforeResHeaderRender" />
</div>
.aspx.cs
protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, DayPilot.Web.Ui.Events.Scheduler.BeforeResHeaderRenderEventArgs e)
{
  e.CssClass = "my-class";
}

CSS: You can create your own theme or override the built-in theme (scheduler_default). You need to use a more specific selector to override the builtin theme.

#dp .scheduler_default_resourcedivider {
  background-color: transparent;
}
#dp .my-class .scheduler_default_rowheader_inner {
  border-bottom: 1px solid red;
}
New Reply
This reply is
Your name (optional):