when splitter moved to the right, Gantt's header's width was expanded,but The Width of Gantt's timeLine was not expanded.
I think the automatically calculated timeline width of the Gantt chart is wrong
How can I solve this situation?
ps Add another picture.
5 Answers, 1 is accepted
Hi,
As far as I see my colleague Ivan has already replied in the other thread regarding the same issue. For convenience, I will paste his suggestion here as well. I will recommend keeping the conversation in a single thread.
Since in this scenario the pane acts as a container for the Gantt, it might need to be resized programmatically. Try attaching a "resize" event handler to the Splitter and call the Gantt's resize method in the handler:
$("#splitter").kendoSplitter({
panes: [ { collapsible: true }, {} ],
resize: function(e) {
var gantt = $("#gantt").data("kendoGantt");
gantt.resize();
}
});
Please give a try to the suggestion from above and let us know in case you need further assistance on the matter.
Regards,
Neli
Progress Telerik
Thanks for your answer.
When we use gantt.resize();
1. when splitter moved to the right, it is worked successfully. The Width of Gantt's timeLine was expanded
2. when splitter was collapsed, it is not worked successfully.The Width of Gantt's timeLine was not expanded.
Q: Why splitter was collapsed , gantt.resize() is not worked successfully?
Hello,
I have tested locally, but the resize method is called successfully on my end and the Gantt is rendered correctly in a Splitter.
However, I would suggest you use the setTimeout function and test the behavior. The observed issue could be caused if the resize() method is invoked before the Gantt widget is rendered. By using setTimeout method you will ensure that the resize() is called at the right time and the Gantt is available on the page. Here is a Dojo example where this is demonstrated.
Another suggestion is to call the Gantt resize() method when some of the Splitter events are triggered. For example, you could use the expand or collapse event handlers and try to resize the Gantt there.
I would also recommend you to check the Kendo UI for Angular Forum. As Integrating Kendo UI widgets for jQuery in an Angular application is not officially supported, such problematic behaviors could be discussed by the community in the Forum threads.
I hope you will find the provided suggestion helpful.
Regards,
Neli
Progress Telerik
Thank you for your answer
we use setTimeout function and test the behavior.
It worked successfully.
Hello,
Thank you for sharing what has resolved the issue on your end with the community. I am happy that the suggested approach has helped you to find a solution. We always appreciate any feedback as it could be helpful for someone else in the future who has a similar scenario.
Regards,
Neli
Progress Telerik