DayPilot.Scheduler.onBeforeRowHeaderColumnRender

The onBeforeRowHeaderColumnRender event lets you customize the Scheduler row header columns. It provides access to the column headers at the top. To access the column data, use onBeforeRowHeaderRender.

Available since 2020.1.4266.

Declaration

DayPilot.Scheduler.onBeforeRowHeaderColumnRender(args);

Parameters

  • args.column.areas (array) - active areas (for item structure, see DayPilot.Area)

  • args.column.toolTip (string) - tooltip text (available since 2023.3.5731)

  • args.column.cssClass (string) - the CSS class to be added to the header cell (available since 2021.3.5045)

  • args.column.data (object) - column data object from rowHeaderColumns (read-only)

  • args.column.html (string) - the column header HTML (read/write)

  • args.column.sortingEnabled (boolean) - visibility of the sort icon (read/write); default value is true; this property is ignored if row sorting is not enabled for this column

Example

This example disables the built-in sort icon for the "Capacity" column.

dp.rowHeaderColumns = [
  { name: "Name", display: "name", sort: "name"},
  { name: "Capacity", display: "capacity", sort: "capacity"}
];
dp.resources = [
  { name: "Resource 1", id: 1, capacity: 20 },
  { name: "Resource 2", id: 2, capacity: 10 },
];
dp.onBeforeRowHeaderColumnRender = function(args) {
  if (args.column.data.name === "Capacity") {
    args.column.sortingEnabled = false;
  }
};