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

Scheduler Freeze after navigate between views

4 Answers 127 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
test
Top achievements
Rank 1
test asked on 22 May 2014, 06:15 AM
Hello

I was trying evaluate the scheduler widget in appbuilder and found very interesting thing. I created three views and the third view contains the scheduler div which got initialized on data-init event of that view.

Everything worked very well before I tried to dig deeper and wanted to do something on click of save button under the event view. On save I tried to navigate to another view  which i successfully able to but when i come back again to scheduler, I found everything got freeze in scheduler and scheduler becomes unselectable.

I was thinking to reinitialize scheduler whenever I navigate to that view. Please let me know the best possible solution in this case.

I have created a sample project. Please have a look at the following URL:

http://trykendoui.telerik.com/ataX

In order to reproduce the issue, open Drawer, click scheduler, navigate to event details, there is one button " Go to Home" click that and again try to come back on scheduler using drawer menu.




4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 22 May 2014, 08:08 AM
Hi,

The behavior you are observing is due to scheduler not being visible when closing the edit form. Thus, when its layout is redrawn, it is not visible. In order to correct this you will need to manually refresh the scheduler when navigating to the view in which it is placed. For example:

<div data-role="view" id="drawer-scheduler" data-layout="drawer-layout" data-init="initScheduler" data-show="showSchedulerView">
        <!--..-->
</div>
 
<script>
    function showSchedulerView(e) {
       e.view.content.find("[data-role=scheduler]").kendoScheduler("refresh");
    }
</script>
 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
test
Top achievements
Rank 1
answered on 22 May 2014, 09:23 AM
Hello Rosen

I edited the sample based on your recommendations but unfortunately all controls inside scheduler becomes unresponsive after you navigate to another view and again back to scheduler.

Here is the edited sample:

http://trykendoui.telerik.com/ataX/3

Thanks
0
Rosen
Telerik team
answered on 22 May 2014, 11:29 AM
Hi,

This issue is caused by the fact that the view is navigated during navigation of the Scheduler internal view, which is not supported. In order to workaround it you may try to prevent the databinding of the Scheduler on save (preventing the navigation of the edit form view) and then navigate to the initial view. Similar to the following:

function scheduler_save(e) {   
      this.one("dataBinding", function(e) {
        e.preventDefault();
        app.navigate("#drawer-home");
      });
}


Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
test
Top achievements
Rank 1
answered on 23 May 2014, 08:49 AM
Thanks :) It's working
Tags
Scheduler
Asked by
test
Top achievements
Rank 1
Answers by
Rosen
Telerik team
test
Top achievements
Rank 1
Share this question
or