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?
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);
}
}