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

Shedule whitin tab error methods

3 Answers 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Leonardino
Top achievements
Rank 1
Leonardino asked on 27 Dec 2013, 05:34 AM
hi

I have a sheduder within a tabstrip,
when I move to the second tab and return to the tab that contains the sheduder
the onChange event of  DropDownList that refresh  sheduler throws me the following error:

function onChange() {       
    kendo.ui.progress($("#scheduler"), true);
    var scheduler = $("#scheduler").data("kendoScheduler");
    scheduler.dataSource.read();
};  

Uncaught TypeError: Cannot read property 'dataSource' of undefined 

Please help me
Thanks.

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 27 Dec 2013, 10:17 AM
Hello Leonardino,

It seems that you are not able to get reference to the Scheduler widget. Here is an example where this scenario works correctly: http://jsbin.com/OTEViMan/1/edit

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Leonardino
Top achievements
Rank 1
answered on 27 Dec 2013, 01:56 PM
My tabs are created dynamically and sheduler container is a jsp
Why the reference is lost when return to the tab?

function createTab(Title,Url){
      var tabStripElement = $("#tabstrip").kendoTabStrip(),
       tabStrip = tabStripElement.data("kendoTabStrip");
       tabStrip.append({
           text: Title,
           contentUrl: Url
       });
   expandContentDivs(tabStripElement.children(".k-content").last());
   tabStrip.select((tabStrip.tabGroup.children("li").length - 1));
}

This is tabstrip ------------------------

<div id="tabstrip">
    <ul>
       <li class="k-state-active">Inicio</li>
   </ul>
   <div>
       <p><button type="button" class="k-button" id="appendButton">Reloj</button></p>
   </div>
   <script type="text/javascript">
          $("#tabstrip").kendoTabStrip({
            animation:  {
             open: {
               effects: "fadeIn"
             }
           },
        });
   </script>
           </div>

THIS IS .JSP CONTAINER SHEDULER IN ATACH--------------------------


0
Accepted
Leonardino
Top achievements
Rank 1
answered on 29 Dec 2013, 04:03 AM
I have solved all my problems, The problem was that I had already imported index.jsp js / js jquery.min.js and / kendo.web.min.js.
The duplicates had on. Internal jsp load for ajax. I removed the Duplicate js and ready  :) :)

Thanks for the help.
Tags
Scheduler
Asked by
Leonardino
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Leonardino
Top achievements
Rank 1
Share this question
or