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

Grid Lines

Related article: Hotel Room Booking Tutorial (ASP.NET, C#, VB, SQL Server)
Asked by Priyanga Wijesiri
7 years ago.

Hi,
Am Priyanga from Sri Lanka, evaluating Daypilot in VS2013/VB
I use Scheduler for Hotel Room project, and the grid line should be shown as the attachment. I captured this image from https://code.daypilot.org/48275/hotel-room-booking-asp-net-c-vb-sql-server
But I cannot find how to do it. Please advice.

priyangacw@gmail.com

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

If you mean the grid cells starting and ending at 12:00 (noon) instead of 00:00 (midnight) then this is implemented using a custom timeline feature:

https://doc.daypilot.org/scheduler/timeline/

It's not described in the tutorial text but you can implement it like this (see Page_Load method in Default.aspx.vb):

DayPilotScheduler1.Scale = TimeScale.Manual
Dim start As New Date(Date.Today.Year, 1, 1, 12, 0, 0)
Dim [end] As Date = start.AddYears(1)

DayPilotScheduler1.Timeline.Clear()
Dim cell As Date = start
Do While cell < [end]
  DayPilotScheduler1.Timeline.Add(cell, cell.AddDays(1))
  cell = cell.AddDays(1)
Loop
Comment posted by Priyanga Wijesiri
7 years ago.

This solution didn't work for me. I tried with many alternatives also.
Please let me know the exact solution if you can give.

Thanx in Advance.

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