Fix width of the grid


#1

Hi,

Is it possible to put fixed width of the whole column, because I only need one column and I would like to remove the extra spaces.

Thank you.


#2

Hi @tommyBoy!

You can set the width property to the gantt.config.columns object:

gantt.config.columns=[
    {name:"text", label:"Task name", tree:true, width: 150 }
];

Here are related article and snippet:
https://docs.dhtmlx.com/gantt/api__gantt_columns_config.html
http://snippet.dhtmlx.com/7a5b3ceff

Alternatively, you can set the grid_width property.
Here are related article and snippet:
https://docs.dhtmlx.com/gantt/api__gantt_grid_width_config.html
http://snippet.dhtmlx.com/8221b0ece


#3

Hi @guldmi

Thank you so much.