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

Resizing scheduler on edit/create event popup, events don't move and resize with scheduler

6 Answers 379 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 12 Apr 2017, 09:29 PM

We have need to make the kendo scheduler visible when the create/edit popup is brought up (by double clicking an event already there, or a free spot on the scheduler), so we resize the scheduler and fit the popup off to the right in the space now open. I have it resizing using the open, close, activate, and deactivate events of the window to control when to resize the scheduler.

However, when it resizes, the events stay the same size and don't move while the days in the week and month view squish with the resize, making all the events out of place until the scheduler refreshes. However, when refreshing after resizing the scheduler, the edit/create popup closes, which throws an exception because the scheduler edit event can no longer find components that were defined in the edit html template...

Is there a good way to resize the scheduler and have events follow the resize on edit/create popup open?

6 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 17 Apr 2017, 06:08 AM
Hello,

The scenarios we would rather recommend using a solution similar to the one described in this help topic and update the events from an external editors form. 

Regards,
Plamen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Tyler
Top achievements
Rank 1
answered on 18 Apr 2017, 09:28 PM
Thank you, an external editor will definitely be useful, as that should make it easier to stick to the edge. However, we still want it hidden, then expand it when actually creating/editing an event, which will still require squishing and expanding the scheduler as the editor is hidden and revealed, so I still run into the issue of the events not following the resizing of the scheduler and staying where they were at. Or would the best option be to resize then refresh immediately to get the events to fit in the new space?
0
Tyler
Top achievements
Rank 1
answered on 18 Apr 2017, 09:31 PM
Because if I open the dev console in Chrome or just shrink the web page and adjust the width, the scheduler resizes itself and carries all its events with it to the new size, like there is some event being fired to handle this because when I do $('#scheduler')[0].style.width = "988pxx"; (with a transition in my css to make it slide over instead of instantly shrinking) the events in the scheduler do not move with it like when you resize the actual browser with the scheduler.
0
Tyler
Top achievements
Rank 1
answered on 18 Apr 2017, 09:33 PM
Because if I open the dev console in Chrome or just shrink the web page and adjust the width, the scheduler resizes itself and carries all its events with it to the new size, like there is some event being fired to handle this because when I do $('#scheduler')[0].style.width = "988pxx"; (with a transition in my css to make it slide over instead of instantly shrinking) the events in the scheduler do not move with it like when you resize the actual browser with the scheduler.
0
Tyler
Top achievements
Rank 1
answered on 18 Apr 2017, 09:59 PM

Oops, forum errored when I posted that last message and it posted twice apparently. But I found this!

scheduler.element.width(988);  
scheduler.resize(true);

Which resizes the scheduler AND events quite nicely. My question then is... is it possible to attach a transition to this? It would be nice to be able to get the scheduler to slide over instead of just instantly being reduced in width.

0
Plamen
Telerik team
answered on 20 Apr 2017, 04:57 AM
Hello,

The resize method need to refresh (and  re-render) the schedule and its content in order to place the events correctly so there is not transition available for this feature.

Regards,
Plamen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Tyler
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Tyler
Top achievements
Rank 1
Share this question
or