title: Kendo UI: Excel Export not working correctly after datasource refreshing data
body: <p>I have a Grid, when users click a button, it gets some parameters and refresh datasource:</p>
  
  <pre><code>var grdUP = $("#weblogGrid").data("kendoGrid");
  grdUP.dataSource.transport.options.read.url = url; // new url
  
  //Read data source to update
  grdUP.dataSource.read();
  </code></pre>
  
  <p>it works fine. the new data shows in the grid. And the grid has another button, which will export the data to excel. I'm using below code (also tried the built-in button):</p>
  
  <pre><code>var grid = $("#weblogGrid").data("kendoGrid");
  grid.saveAsExcel();
  </code></pre>
  
  <p>it actually exports the data to excel file. </p>
  
  <p>However, it always exports the initial data in the grid, not the data user refreshed. </p>
  
  <p>For example, when the grid first shows up, it has 10 rows data. After refresh, it has 5 rows data. Now, if export, it still exports 10 rows data although the data in grid is different.</p>
  
  <p>Is this a Bug? or, maybe I did something wrong in refresh grid?</p>
  
  <p>Thanks</p>
  
  <p>===============================
  edit to clarify something</p>
  
  <p>Thanks. currently, I got new data using:</p>
  
  <pre><code>var url = '/WeblogReport/GetWebLogList?fromDate=' + fromDate + '&amp;toDate=' + toDate;
  var grdUP = $("#myGrid").data("kendoGrid");
  //Set url property of the grid data source
  grdUP.dataSource.transport.options.read.url = url;
  //Read data source to update
  grdUP.dataSource.read();
  </code></pre>
  
  <p>So I changed to:</p>
  
  <pre><code>// get value of date
  ....
  
  $.ajax({
      type: "GET",
      dataType: "json",
      url: "/WeblogReport/GetWebLogList",
      data: { FromDate: fromDate, ToDate: toDate },
      success: function (data) {
          alert(data);
  
          var grid = $("#myGrid").data("kendoGrid");
  
          grid.dataSource.data(data);
          grid.refresh();
      }
  });
  </code></pre>
  
  <p>Somehow, it does not show the new data. Any suggestions? </p>
  
  <p>Thank you very much.</p>
  
  <hr>
  
  <p>add more clarification</p>
  
  <p>Here is in the Json call.</p>
  
  <pre><code>success: function (data) {
      var newdata = [{ "UserName": "username", "ClientIP": "1.1.1.1"}];
  
      $("#myGrid").data("kendoGrid").dataSource.data(newdata);
      $("#myGrid").data("kendoGrid").refresh();
  
      //$("#myGrid").data("kendoGrid").saveAsExcel();
  }
  </code></pre>