DayPilot.Gantt.onAfterRender

The onAfterRender event handler fires after the Gantt control is updated.

Declaration

DayPilot.Gantt.onAfterRender(args)

Parameters

  • args.data - custom data sent from the server side using the Update() method (ASP.NET WebForms, ASP.NET MVC).
  • args.isCallBack (boolean) - true if this update follows a server-side CallBack (ASP.NET WebForms, ASP.NET MVC).
  • args.isScroll (boolean) - true if this update was triggered by scrolling.

Notes

This event is called after the Gantt control is updated:

  • After control initialization (initial page load).
  • After PostBacks (ASP.NET WebForms).
  • After CallBacks (ASP.NET WebForms, ASP.NET MVC).

Examples

JavaScript

const gantt = new DayPilot.Gantt("dp", {
  onAfterRender: (args) => {
    if (args.isCallBack) {
      console.log("Server data:", args.data);
    }
  },
  // ...
});
gantt.init();

Angular

<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
  onAfterRender: args => {
    if (args.isCallBack) {
      console.log("Server data:", args.data);
    }
  },
  // ...
};

React

<DayPilotGantt
  onAfterRender={onAfterRender}
  {/* ... */}
/>
const onAfterRender = (args) => {
  if (args.isCallBack) {
    console.log("Server data:", args.data);
  }
};

Vue

<DayPilotGantt
  @afterRender="onAfterRender"
  <!-- ... -->
/>
const onAfterRender = (args) => {
  if (args.isCallBack) {
    console.log("Server data:", args.data);
  }
};

See Also

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript