search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How can I change font css for a specific Task Column in Gantt Chart

Asked by Anonymous
6 years ago.


I want to change font size, color for main Task Column. How to apply css or change font size, color for specific task column (probably main task).?

Thanks for help in advance.


Answer posted by Dan Letecky [DayPilot]
6 years ago.

Each row header column cell is marked with several CSS classes. One of them is column-specific and includes the column number.

Example: Column #2 (indexed from 0) with the default theme ("gantt_default") uses the following CSS class:


In addition to that, you can use BeforeTaskRender event handler to specify custom CSS class that will be applied to all row header columns of a given row:

protected override void OnBeforeTaskRender(BeforeTaskRenderArgs e)
    if (e.Row.Columns.Count == 3)
        e.Row.CssClass = "my-row";

See also:

Then you can simple add a custom CSS which targets the cell using a combination of those classes: .gantt_default_rowheader_inner {
  color: #ccc:
  background-color: #fff;
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.