What styles do you have on gantt’s container ?
When calling gantt.setSizes, gantt will adjust the component’s UI to the size of HTML container. So it will adjust UI to the new page size only if size of html container was changed.
Normally having style like “height:100%” on gantt’s container is enough.
I don’t think its a css issue as I tried to also call “gantt.render();” and the gantt did not redraw. Again the dhtmlxgantt.js file evaluated successfully.
Perhaps it is something to do with having loaded the gantt in an ajax container?
I tried for an hour to create a JSfiddle that simulated this, however I gave up because I don’t completely understand how the AJAX simulation works with JSFIddle.
Check the size of html container, is it really takes all space and gantt is smaller than container ? In such case, you can try to delay the setSizes call ( put it in setTimeout with 1ms delay - it will resolve a possible sizing concurrency )
If you have a live demo - you can send me PM with details.