DayPilot Knowledge Base

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

Events not showing up in the Scheduler

Last revision: Feb 24, 2010

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 DayPilotScheduler.Scheduler('...control id here...');

The events collection looks like this:

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

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

How to show the selected date using a Label control
How to use DayPilot Scheduler with LINQ to SQL
How to set the time cell colors using database data in the Scheduler
How to show one month per cell in Scheduler (CellDuration = Month)