DayPilot.Gantt.onBeforeCellRender

Fired before the grid cell is rendered. You can use this event to customize the cell appearance.

Declaration

DayPilot.Gantt.onBeforeCellRender(args)

Parameters

  • args.task (DayPilot.Task object)
  • args.cell.start (DayPilot.Date object; read-only)
  • args.cell.end (DayPilot.Date object; read-only)
  • args.cell.cssClass (string, custom cell CSS class)
  • args.cell.html (string, custom cell HTML)
  • args.cell.backImage (string, background image URL)
  • args.cell.backRepeat (string, background-repeat style)
  • args.cell.backColor (string, custom cell background color, e.g. "#ccc" or "red")
  • args.cell.business (boolean, busines/non-business status)

Example

gantt.onBeforeCellRender = function(args) {
  if (args.cell.start.getDayOfWeek() === 6) {
    args.cell.backColor = "#dddddd";
  }
};