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

Reuse an instance of Kendo Scheduler

1 Answer 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Khurram Ilyas
Top achievements
Rank 1
Khurram Ilyas asked on 06 Aug 2019, 02:38 PM

Is it possible to reuse an instance of kendo scheduler in an angularjs application? I have a scheduler with the following html.

<div kendo-scheduler="ctrl.scheduler" k-options="ctrl.schedulerOptions" k-rebind="ctrl.schedulerOptions"></div>

 

Now, a panel opens (for creating an event) with a button on the same screen, that displays the same scheduler with same events. I don't want to give it k-options again. I passed ctrl.scheduler to the panel and tried setting kendo-scheduler to an already created instance of scheduler, but it didn't work. Is there any other way? Thanks

<div kendo-scheduler="ctrl.scheduler"></div>

 

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 08 Aug 2019, 08:34 AM
Hello Khurram,

I am afraid that the Scheduler instance could not be literally "reused". What I could suggest you instead is to move the DOM stricture representing the Scheduler to the new location:
angular.element(document)
  .find('#schd')
  .appendTo(angular.element(document).find('#win'));

Here you could find a small sample implementing the above approach.

In case you need to keep the Scheduler instance at its initial location and at the same time have a second Scheduler duplicated somewhere in the view, I an afraid that such scenario would only be achieved by initializing a new instance with k-options.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
Khurram Ilyas
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or