Category / Section
How to format the cell content style in Gantt
1 min read
It is possible to format the cell content style in Gantt using queryCellInfo client side event. This event will be triggered while rendering each cell in Gantt.
The below code example explains how to customize the font color of a cell using queryCellInfo event,
<div id="GanttContainer" style="width:100%;height:450px;" /> <script type="text/javascript"> $(function () { $("#GanttContainer").ejGantt({ dataSource: data, //.. queryCellInfo: function (args) { var index = args.data.index; //To change the font color for selected Indexes if (index == 1 || index == 3 || index == 5 || index == 7) $(args.cellElement).css({ "color": "blue" }); }, }); }); </script>
Sample with customized font colors for a task item is available in the following link,