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 theUpdate()method (ASP.NET WebForms, ASP.NET MVC).args.isCallBack(boolean) -trueif this update follows a server-side CallBack (ASP.NET WebForms, ASP.NET MVC).args.isScroll(boolean) -trueif 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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot