Scheduler: Dynamic Event Loading

scheduler-dynamic-event-loading2.png

By default, all events from the full active range (defined by StartDate, Days and Resources) are loaded from the server. This may become slow for a large number of events.

There is an option to load only the events for the visible range. Events will be loaded and rendered as the users scrolls.

Usage

1. Activate the dynamic event loading mode using DynamicLoading property"

DynamicLoading="true"

2. Handle Scroll event:

OnScroll="DayPilotScheduler1_Scroll"protected void DayPilotScheduler1_Scroll(object sender, DayPilot.Web.Ui.Events.ScrollEventArgs e)
{
  setDataSourceAndBind();
  DayPilotScheduler1.Update();
}

Information about the visible range is stored in the ViewPort property:

  • ViewPort.Start - Start of the visible range (DateTime)
  • ViewPort.End - End of the visible range (DateTime)
  • ViewPort.Resources - List of IDs (Value property) of the visible resources (List<string>)

Demo:

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java