0👍
If you don’t use a custom layout configuration, you can toggle the gantt.config.show_grid
property and use the gantt.render()
method to repaint the chart:
https://docs.dhtmlx.com/gantt/api__gantt_show_grid_config.html
https://docs.dhtmlx.com/gantt/api__gantt_render.html
Otherwise, you need to change the layout configuration and reinitialize Gantt to see the changes:
https://docs.dhtmlx.com/gantt/desktop__layout_config.html
https://docs.dhtmlx.com/gantt/api__gantt_init.html
Here are examples:
Toggle grid:
http://snippet.dhtmlx.com/5/763029f57
toggle grid + layout:
http://snippet.dhtmlx.com/5fc27c820
Here is a Vue demo:
https://files.dhtmlx.com/30d/f23270e75a32303a0dbea5efc27e7544/vue+toogle-grid.zip
- [Vuejs]-Property or method "firstName" is not defined on the instance but referenced during render
- [Vuejs]-Why Datetime being not set using v-model?
Source:stackexchange.com