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

multiple lines in the resource header of a scheduler

Asked by Ian Chan
16 years ago.

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?

Comment posted by Dan Letecky
16 years ago.
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);
}
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.