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

Show diferent intervals between one hour to another

Asked by Johnny Gonzalez
11 years ago.

I'm trying to show the intervals between two hours.

Before with the web forms version I used:

protected override void OnBeforeTimeHeaderRender(BeforeTimeHeaderRenderArgs e)
{

int cells = 60 / CellDuration;
System.Text.StringBuilder sb = new System.Text.StringBuilder();

sb.Append("<table style='width:100%' cellpadding='0' cellspacing='0'>");

for (int i = 0; i < cells; i++)
{
sb.Append("<tr><td>");
sb.Append("<div style='height:");
sb.Append(30 - 1);
sb.Append("px;border-bottom:1px solid");
sb.Append(";'>");
sb.Append(e.Hour);
sb.Append(":");
sb.Append((i * CellDuration).ToString("00"));
sb.Append("</div>");
sb.Append("</td></tr>");
}

sb.Append("</table>");

e.InnerHtml = sb.ToString();

}

How to do it in the MVC version?

Thanks

Johnny

Answer posted by Dan Letecky [DayPilot]
11 years ago.

You can use TimeHeaderCellDuration property to customize the time header cell size (Calendar):

http://doc.daypilot.org/calendar/time-header-cell-duration/

OnBeforeTimeHeaderRender method can be used for further customization (HTML):

http://doc.daypilot.org/calendar/time-header-customization/

Comment posted by Johnny Gonzalez
11 years ago.

Is there any example on how to implement it with ASP.NET MVC Razor.
I can't access the Html helper from Jquery.

Thanks

Johnny

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.