Hi,
I use gantt with header fixed. When I scroll mouse wheel in left side, for sync scrolling, I will manually change the scrollTop of .gantt_data_area. But new rows scrolling in are empty.
Is there any way to render empty rows?
Hello,
Gantt uses the smart rendering feature, when the task rows outside the viewport are not displayed. So, when you change the DOM property of the timeline, it doesn’t change anything.
To scroll the timeline, you need to update the scroll position of the scrollbar that is linked to the timeline.
However, it is much easier to configure the layout that has the same vertical scrollbar for the grid and timeline. And this is how it works with the default configuration:
https://docs.dhtmlx.com/gantt/desktop__layout_config.html#defaultlayout
You can see that in the following snippet:
https://snippet.dhtmlx.com/ri1b3mth
If you only want to move the vertical scrollbar between the grid and timeline, you can easily do that:
gantt.config.layout = {
css: "gantt_container",
rows:[
{
cols: [
{
view: "grid",
scrollX:"scrollHor",
scrollY:"scrollVer"
},
{
view: "scrollbar",
id:"scrollVer"
},
{ resizer: true, width: 1 },
{
view: "timeline",
scrollX:"scrollHor",
scrollY:"scrollVer"
},
]},
{
view: "scrollbar",
id:"scrollHor"
}
]
}
Here is the snippet:
https://snippet.dhtmlx.com/px7ikqqs
If you have a specific use case and the information above doesn’t help you, please provide a more detailed explanation regarding the use case.
Also, I will need a ready demo so that I can reproduce the issue locally.
You can add your configuration to the following snippet and make sure that the issue is reproduced there:
Then, click on the Save
button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.