DayPilot.Scheduler.onLoadNode

Declaration

onLoadNode(args)

Parameters

  • args.resource (clicked resource) - the original resource as in .resources (direct access)
  • args.async (false)
  • args.loaded()

Example (sync)

    dp.onLoadNode = function(args) {
        args.resource.children = [
            { name : "Room 111", id : "111"},
            { name : "Room 112", id : "112"}
        ];
    };    

Example (async)

dp.onLoadNode = function(args) {
        args.async = true;
        
        // simulating slow server-side load
        setTimeout(function() {
            args.resource.children = [
                { name : "Room 111", id : "111"},
                { name : "Room 112", id : "112"}
            ];
            args.loaded();
        }, 100);
    };

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