The onRowEdit event handler fires when the user finishes inline row editing in the Gantt Chart, before the default action specified by rowEditHandling.
The default action can be canceled by calling args.preventDefault().
DayPilot.Gantt.onRowEdit(args)args.task - DayPilot.Task object representing the task.
args.newText (string) - new text provided by the user. Read/write since 2023.1.5529.
args.x (number) - column index. Available since 2023.1.5529.
args.preventDefault() - cancels the default action.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
rowClickHandling: "Edit",
rowEditHandling: "Update",
onRowEdit: (args) => {
args.newText = args.newText.trim();
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
rowClickHandling: "Edit",
rowEditHandling: "Update",
onRowEdit: args => {
args.newText = args.newText.trim();
},
// ...
};React
<DayPilotGantt
rowClickHandling="Edit"
rowEditHandling="Update"
onRowEdit={onRowEdit}
{/* ... */}
/>const onRowEdit = (args) => {
args.newText = args.newText.trim();
};Vue
<DayPilotGantt
rowClickHandling="Edit"
rowEditHandling="Update"
@rowEdit="onRowEdit"
<!-- ... -->
/>const onRowEdit = (args) => {
args.newText = args.newText.trim();
};Row Editing [doc.daypilot.org]