title: Reloading a Kendo UI scheduler
body: <p>Hello,<br/>
  I have two different scheduler to display one after the other.<br/>
  In a js file I have this function :</p>
  
  <pre><code>function doRafraichirInterface() {
      if (b_FENETRE_OUVERTE) {
          return;
      }
      if (flag == false){
          flag = true;
          console.log(flag);
      }
      else{
          flag = false;
          console.log(flag);
      }
      // Rafraichissement du planning
      $("#scheduler").data("kendoScheduler").dataSource.read();
      $("#scheduler").data("kendoScheduler").refresh();
  
  }
  </code></pre>
  
  <p>This function is called every 15 seconds.<br/><br/>And in a .aspx file, I use a Kendo UI Schedule :<br/></p>
  
  <pre><code>var myView = kendo.ui.MultiDayView.extend({    
              options: {
                  selectedDateFormat: "{0:D} - {1:D}"
              },
              name: "Un jour",
  
  
              calculateDateRange: function() {
                  //create a range of dates to be shown within the view
                  var ladate = new Date();
                  var Today = ladate.getDay();  
                  var year = ladate.getFullYear();
                  var month = ladate.getMonth();
                  var day = ladate.getDate();
  
                  var selectedDate = this.options.date,                       
                      idx, length,
                      dates = [];
  
                  if (flag == false)
                  dates.push(new Date(year, month, day));
                  else{
                      if (Today == 1)
                      {
                          var start = kendo.date.dayOfWeek(selectedDate, Today - 2, -1);
                      }
                      else
                      {
                          var start = kendo.date.dayOfWeek(selectedDate, Today - 1, -1);
                      }
  
                      for (idx = 0, length = 8; idx &lt; length; idx++) {
                          if (start.getDay() != 0) {
                              dates.push(start);
                          }
                          start = kendo.date.nextDay(start);
                      }
                  }
                  this._render(dates);    
              }
          });
  </code></pre>
  
  <p>How can I reload the scheduler to change the view ?<br/>Thanks by advance for your answers and sorry for my bad english and the french name of my functions and comments.<br/><br/>EDIT : I've seen a "scheduler.view" method that could allow me to switch between my two views. So I split my in two function like this :</p>
  
  <pre><code>            var oneDayView = kendo.ui.MultiDayView.extend({    
              options: {
                  selectedDateFormat: "{0:D} - {1:D}"
              },
              name: "Un jour",
  
  
              calculateDateRange: function() {
                  //create a range of dates to be shown within the view
                  var ladate = new Date();
                  var year = ladate.getFullYear();
                  var month = ladate.getMonth();
                  var day = ladate.getDate();
  
                  var selectedDate = this.options.date,                       
                      idx, length,
                      dates = [];
  
                  dates.push(new Date(year, month, day));
  
                  this._render(dates);    
              }
          });
  
          var oneWeekView = kendo.ui.MultiDayView.extend({    
              options: {
                  selectedDateFormat: "{0:D} - {1:D}"
              },
              name: "Une semaine",
  
  
              calculateDateRange: function() {
                  //create a range of dates to be shown within the view
                  var ladate = new Date();
                  var Today = ladate.getDay();  
  
                  var selectedDate = this.options.date,                       
                      idx, length,
                      dates = [];
  
  
                      if (Today == 1)
                      {
                          var start = kendo.date.dayOfWeek(selectedDate, Today - 2, -1);
                      }
                      else
                      {
                          var start = kendo.date.dayOfWeek(selectedDate, Today - 1, -1);
                      }
  
                      for (idx = 0, length = 8; idx &lt; length; idx++) {
                          if (start.getDay() != 0) {
                              dates.push(start);
                          }
                          start = kendo.date.nextDay(start);
                      }
                  this._render(dates);    
              }
          });
  </code></pre>
  
  <p>And changed the "doRafraichirInterface" to this :<br/></p>
  
  <pre><code>    function doRafraichirInterface() {
      if (b_FENETRE_OUVERTE) {
          return;
      }
      if (flag == true){
          console.log(flag);
          flag=false;
          $("#scheduler").data("kendoScheduler").view("oneDayView");
  
      }
      else{
          console.log(flag);
          flag=true;
          $("#scheduler").data("kendoScheduler").view("oneWeekView");
  
      }
  
      // Rafraichissement du planning
      $("#scheduler").data("kendoScheduler").dataSource.read();
      $("#scheduler").data("kendoScheduler").refresh();
  
  }
  </code></pre>
  
  <p>But my views don't switch, Any ideas ?<br/><br/>EDIT2 : I tried to switch between "day" and "week" with the method I describe higher and it's working. The new question is : how can I switch between two CustomView ?</p>