The row headers can be customized using BeforeRowHeaderRender event. 

In the server-based editions you should use BeforeTaskRender event which lets you customize the task row and the task box at the same time.

JavaScript

Use onBeforeRowHeaderRender event.

Example

gantt.onBeforeRowHeaderRender = function(args) {
  var duration = new DayPilot.TimeSpan(args.task.end().getTime() - args.task.start().getTime());
  var html =  duration.toString("d") + "d " + duration.toString("h") + "h";
  args.row.columns[2].html = html;
};

See also:

ASP.NET

Use BeforeTaskRender event.

  • e.Row will let you specify the properties related to the task row header.
  • e.Box will let you specify the properties related to the task box.

e.Box properties:

  • Areas
  • BackgroundColor
  • BubbleHtml
  • Columns
  • ContextMenuClientName
  • CssClass
  • Expanded
  • Html
  • MarginBottom
  • MinHeight
  • MoveEnabled
  • ToolTip

Example

void DayPilotGantt1_BeforeTaskRender(object sender, BeforeTaskRenderEventArgs e)
{
  e.Row.CssClass = "important_task";
}

ASP.NET MVC

Example

protected override void OnBeforeTaskRender(BeforeTaskRenderArgs e)
{
    if (e.Row.Columns.Count == 3)
    {
        e.Row.Columns[2].Html = (e.End - e.Start).ToString();
    }
}