The onColumnResized event handler fires when the user resizes a column from the DayPilot.Gantt.columns array.
DayPilot.Gantt.onColumnResized(args)args.column (object) - the resized column from the columns array
The DayPilot.Gantt.columns property is updated automatically.
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);
};