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

Rowheader columns background-color

Asked by Henner
2 months ago.

Hi,

i just updated my application with the newest release of your component. Now i'm trying to set the background-colors of my scheduler ressource row header columns. But i can't find any of the properties described in your api reference. Even the resourceheadercolumnmode does not exist (tabular oder legacy). I just want to color the background for the full row without margins, paddings or something.

Where's my mistake?

Best regards,

Henner

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

You can set the background color for the whole row header using e.BackgroundColor in BeforeResHeaderRender:

protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, DayPilot.Web.Ui.Events.Scheduler.BeforeResHeaderRenderEventArgs e)
{
  if (e.Id == "E")
  {
    e.BackgroundColor = "green";
  }
}

To set the background color of individual columns you can use CSS. The columns are marked with CSS classes that include a column number, like .scheduler_default_rowheadercol0, .scheduler_default_rowheadercolq, .scheduler_default_rowheadercol2.

protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, DayPilot.Web.Ui.Events.Scheduler.BeforeResHeaderRenderEventArgs e)
{
  if (e.Id == "E")
  {
    e.CssClass = "my-row";
  }
}

CSS:

.my-row.scheduler_default_rowheadercol0 {
  background: red;
}
</pre.

See also:
https://doc.daypilot.org/scheduler/row-header-customization/

The ASP.NET version only supports the legacy mode. 
New Reply
This reply is
Your name (optional):