This is a migrated thread and some comments may be shown as answers.

Scheduler doesn't update it's layout when parent container size changes

1 Answer 129 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Iron
Iron
Andrew asked on 21 Jan 2016, 05:18 AM

We have a scheduler nested inside a div element. This div element can change its width.

 When the container div changes its width, the schedule elements no longer align correctly on the calendar.

 

See this Plunker snippet for a demonstration of the problem:  http://plnkr.co/edit/UlHFtkvHHtIStnHEnOP9?p=preview

After you've pressed the "Toggle Left Bar" button, you see that "Alex's Birthday" now straddles two days.

 

Is there are workaround to this problem?

Our code base is arranged so that the parent control knows nothing about the child controls hosted within it.

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 22 Jan 2016, 10:00 AM
Hi Andrew,

This behavior is expected as the Scheduler by default listens for layout changes in the size of the "body" element which in current case is not modified. Possible solution is to manually call the "refresh" method of the Scheduler when the Left bar expand / collapse animation is completed:

var scheduler = $("#scheduler").getKendoScheduler();
scheduler.refresh();

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Andrew
Top achievements
Rank 1
Iron
Iron
Answers by
Vladimir Iliev
Telerik team
Share this question
or