Dynamically Adjusting Grid Column Width


Hi There

Is there an easy way to dynamically control the width of the Columns in the Grid. Either by word wrap or adjusting the coumn width based on the content. (or both)

I know I can adjust these programatically, I just wondered it there was a more elegant solution that didn’t involve user input after the Gantt has loaded.

See screen shot showing how the task names are cut short. We are looking for these to wrap and/or dynamically adjust the task name column width.

Many Thanks!



unfortunately there is nothing built-in for this. We are considering adjusting grid sizing in the upcoming update, but right now there is nothing specific about such use-case.


Is there any update on this?


still no built-in solution,
however you can check the demo of how the task can be solved using a public api -
docs.dhtmlx.com/gantt/snippet/4043c840 - each time data is rendered or updated the code traverses task tree, estimates the size of the longest description and adjusts sizes of a grid.


Is there any update on this?


Hello Prakash,
Unfortunately, it is still not a built-in feature.
We still have that task in the tracker, and someday, the dev team will implement that. I cannot give you an ETA, but I will notify you when it is implemented.
However, there is another implementation of that functionality:


Hello everyone,
The dev team added the feature that allows stretching the grid even when it has the scrollbar:
You can see how it works in the following sample: