Fix width of the grid

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.

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

1 Like

Hi @guldmi

Thank you so much.