Solution 1 :

Please use task_class template to specify the CSS class that will be applied to task bars with children to hide them

and getChildren method to check if the target task has got the 1st-level child tasks:

gantt.templates.task_class = function(start, end, task){
  var children = gantt.getChildren(;
    return "hideTask";

  return "";


.hideTask{visibility: hidden;}


Problem :

In DHTMLX Gantt chart

I need to show all hierarchy structure tasks in left panel like

  1. Parent
    1.1 SubParent
    1.1.1 Tasks

But Right side panel i need to show only child tasks not parent and subparent.

You can refer below screen shot’enter image description here

Reference Link :

1. I need to hide strategic Definition and Obtain/create… right side blue bar only.