DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot ASP.NET Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot ASP.NET Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot ASP.NET Scheduler
DayPilot » Knowledge Base » Events not showing up in the Scheduler

Events not showing up in the Scheduler

Last revision: Apr 26, 2013

The events must meet two requirements in order to be visible in the Scheduler:

  1. At least a part of the event duration must be in the visible time range [DayPilotScheduler.StartDate and DayPilotScheduler.StartDate.AddDays(DayPilotScheduler.Days)].
  2. The resource id defined for the event (DataResourceField) must match the id of one of the resources defined in the Resources collection (Resource.Value).

The value of the column defined DataResourceField will be converted to string using Convert.ToString() call. The recommended database types are integer (bigint, int, smallint, tinyint) or string (char, varchar, nchar, nvarchar).

The most common problem is that the resource id doesn't match any of the defined resources:

Debugging

You can check the actual values of the resource id by inspecting the HTML source of the output page (you need at least DayPilot Pro 5.5).

The Scheduler JavaScript section is starting with the following code:

var v = new DayPilot.Scheduler('...control id here...');

The events collection looks like this:

v.events.list = [ {...}, {...} ]

It is a JSON array of event objects. You should be looking for { ..., "Resource":"value" }.

The resources collection is very similar:

v.resources = [ {...}, {...} ]

It is a JSON array of objects as well. You should be looking for {..., "Value":"value" }

Related

DayPilot Calendar control doesn't show any events
How to show the selected date using a Label control
How to load Scheduler resource tree from a database (SQL Server)
How to show one month per cell in Scheduler (CellDuration = Month)