Control over width of split task data columns


#1

Hi,

we are using Gantt in Salesforce Lightning and we somewhat “abuse” it as a grid.
All projects last for a month and they are split into subtasks - one per day.
Everything works fine except that I did not find a way to set the width of the subtask columns.
We want them smaller than 70px. That is the width they are set to automatically.
I have change the width to 40px on all different css-classes, but I seem to be missing something.

I hope I made myself clear and I hope there is a way to control the width of the subtask-columns.
Maybe similar to the columns to the left of the data:

gantt.config.columns = [
{name:“text”, label:“Bezirk”, resize: true, width:180, tree:false }
];

Thanks
Holger


#2

Hello Holger,
Technically, it is possible to use the onrender method to modify the cell width, but that may not look the way you may want:
https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#modifyingcellsafterrendering
http://snippet.dhtmlx.com/5/f13a8d710

If you use the template function, it will work better as you modify only the width of the HTML element that you return:
https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#datamappingandtemplates
http://snippet.dhtmlx.com/5/cf787adf1