DayPilot.Gantt.columns

Declaration

DayPilot.Gantt.columns (array)

Description

Column object structure:

  • title (string) - the column title
  • width (integer) - the initial column width
  • property (string) - the custom task tag field name (source of the cell data)

The property field will be used to load task data into the row cells. The Gantt control searches for the value in DayPilot.Task.data.tags first, then in DayPilot.Task.data.

The column cells can be further customized using onBeforeRowHeaderRender event.

Example

gantt.columns = [
  {
      title: "Name",
      width: 50,
      property: "text"
  },
  {
      title: "Info",
      width: 50,
      property: "info"
  },
  {
      title: "Duration",
      width: 50
  }
];

gantt.tasks.list = [
  {
    start: start,
    end: end,
    id: DayPilot.guid(),
    text: "Task " + i,
    tags: {
      info: "info text"
    }
  }
];

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java