DayPilot Forums

DayPilot is the best open-source Outlook-like calendar control for ASP.NET.
DayPilot Pro Demo (Calendar control)
» DayPilot Pro live demo (Calendar control)
DayPilot Pro Demo (Scheduler control)
» DayPilot Pro live demo (Scheduler control)
Home » How To » multiple lines in the resource header of a scheduler

multiple lines in the resource header of a scheduler

I want to have 2 lines in the resource header of the scheduler. I tried putting a <br> to go to the next line.

But the Div of the header sets the cell height the same as the line height. So the <br> would push the next line out of the cell.

<div unselectable='on' style='margin-left:4px; height:39px; line-height:39px; overflow:hidden;'>

Is there a way around this?

Ian Chan - 3/25/2008 10:48:16 PM
The resource header was causing a lot of troubles (the text wrapping improperly, problems with vertical centering) so the code is a little bit complicated.

It's almost impossible to get multi-line header vertically centered at this moment using the DayPilot API. I will take a look at it. Meanwhile, you can use the following workaround:
protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, DayPilot.Web.Ui.Events.BeforeHeaderRenderEventArgs e)
{
if (!e.IsCorner)
{
e.InnerHTML = String.Format("<div style='line-height:1.2'>{0}<br />Second line</div>",
e.InnerHTML);
}
}
Dan Letecky - 3/26/2008 10:27:18 AM
Post reply