The onRowExpand event handler fires when the user expands a task tree node in the JavaScript Gantt Chart.
Declaration
DayPilot.Gantt.onRowExpand(args)Parameters
args.control(DayPilot.Gantt) - component referenceargs.task(DayPilot.Task) - expanded taskargs.preventDefault()- prevents the action specified byrowExpandHandling
Notes
Calling args.preventDefault() doesn't prevent the node from expanding. It only prevents the action specified using rowExpandHandling.
Examples
JavaScript
const gantt = new DayPilot.Gantt("dp", {
onRowExpand: (args) => {
if (args.task.text() === "Summary") {
args.preventDefault();
}
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
onRowExpand: (args) => {
if (args.task.text() === "Summary") {
args.preventDefault();
}
},
// ...
};React
<DayPilotGantt
onRowExpand={onRowExpand}
{/* ... */}
/>const onRowExpand = (args) => {
if (args.task.text() === "Summary") {
args.preventDefault();
}
};Vue
<DayPilotGantt
@rowExpand="onRowExpand"
<!-- ... -->
/>const onRowExpand = (args) => {
if (args.task.text() === "Summary") {
args.preventDefault();
}
};See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot