The onColumnResized event handler fires when the user resizes a column from the DayPilot.Gantt.columns array.
Declaration
DayPilot.Gantt.onColumnResized(args)Parameters
args.column(object) - the resized column from the columns array
Notes
The DayPilot.Gantt.columns property is updated automatically.
Examples
JavaScript
const gantt = new DayPilot.Gantt("dp", {
columns: [
{ title: "Name", width: 120, property: "text" },
{ title: "Duration", width: 80 }
],
onColumnResized: (args) => {
console.log(args.column.width);
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
columns: [
{ title: "Name", width: 120, property: "text" },
{ title: "Duration", width: 80 }
],
onColumnResized: (args) => {
console.log(args.column.width);
},
// ...
};React
<DayPilotGantt
columns={columns}
onColumnResized={onColumnResized}
{/* ... */}
/>const columns = [
{ title: "Name", width: 120, property: "text" },
{ title: "Duration", width: 80 }
];
const onColumnResized = (args) => {
console.log(args.column.width);
};Vue
<DayPilotGantt
:columns="columns"
@columnResized="onColumnResized"
<!-- ... -->
/>const columns = [
{ title: "Name", width: 120, property: "text" },
{ title: "Duration", width: 80 }
];
const onColumnResized = (args) => {
console.log(args.column.width);
};See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot