I’m stuck on this already for how many days but I can’t find a solution. I need to change the column html on click. I made a custom column that has the dhtmlx gantt open close tree icon that should change to open or close if clicked. I managed to change the column by calling resetLayout but it resets the scroll state and the column states like width, etc and also the resizers. I need it to have the same function as gantt.render() where it only refreshes the whole gantt and not reset anything. I tried to change the classlist of the html but it wont update.
Hello Cairo,
If you change the layout configuration, you need to use the resetLayout or init method to repaint the changes. There is no way to change how it works.
If you want to preserve the sizes and scroll state, you need to save them before applying the changes and restore them after that.
Here is an example of how it can be implemented for the scroll position:
If you want to change the label of the main grid columns, you can modify the column configuration in the gantt.config.columns parameter, then it is enough to use the render method: https://snippet.dhtmlx.com/6q2m2leh