title: Callback function with kendo grid refresh?
body: <p>I'm new to jQuery and javascript as a whole, and recently discovered callback functions as a way to wait until one javascript function finishes prior to calling another. I want to wait until my Kendo grid finishes refreshing, then call a download method that redirects my application to a new URL. Is this possible? I tried to set it up like the code below, but that isn't working:</p>
  
  <pre><code>refreshGridThenLock(downloadAfterRefresh, selectedItems);
  
  function refreshGridThenLock(callbackFunction, selectedItems){
      var grid = $("#grid").data("kendoGrid");
      grid.dataSource.read();
      grid.refresh();
  
      callbackFunction(grid, selectedItems);
  }
  
  function downloadAfterRefresh(){
      initiateFileDownload(selectedItems)
  }
  </code></pre>