The columns.load() method loads resource column data from the specified URL using an AJAX request.
The HTTP method is controlled by the columnsLoadMethod property.
Declaration
DayPilot.Calendar.columns.load(url[, success[, error]])Parameters
url(string) - JSON endpoint URL.success(function) - optional callback invoked after the columns have been loaded.error(function) - optional callback invoked if the request fails.
Notes
Use this method when the list of calendar resources is loaded on demand from the server and needs to be refreshed without rebuilding the component.
Invalid Responses
In Pro since version 2026.4.7086, an empty response body, malformed JSON, or valid JSON that is not an array invokes the error callback. Return [] for an empty collection; an empty body or null is not an empty collection.
args.request contains the original XMLHttpRequest, including for empty responses. args.exception contains the parsing or validation exception when applicable. Invalid responses do not call the success callback or replace the existing collection.
Example
const dp = new DayPilot.Calendar("dp", {
// ...
});
dp.init();
dp.columns.load("/api/resources", (args) => {
dp.message("Resources loaded");
});See Also
DayPilot.Calendar.columnsLoadMethod
Event Loading [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot