How can I fix the position of the top 3 rows when scrolling

When scrolling, I need to keep the top 3 rows fixed .

If I set gantt.config.smart_rendering = false , I can do it.
if set gantt.config.smart_rendering = true, how can I do it

Hello Yuan,
There is no built-in way to do that. You need to implement a custom solution by using the Gantt API and Javascript.

To display custom HTML elements in the timeline, you can use the addTaskLayer method:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html

I have this example of the implementation for one task row:
https://snippet.dhtmlx.com/8tz06f74

If you want, you can create a custom layout configuration and show 2 grid and timeline views. The top views will show only the number of rows you need, but you need to calculate the height for them, and if you scroll the bottom views to the top, you will have duplicate task rows. Unfortunately, there is no ready solution to change how it works.
Here is an example of how it can be implemented:

There is another example of the implementation with a custom datastore and custom cells where you need to manually render everything. But it is working only for one parent row:

If you want us to implement a custom solution for you, you can contact the Sales team:
contact@dhtmlx.com

Thank you.I’ll try it