title: Wait for ajax data load
body: <p>I have a grid that pulls data from an ajax call and a video player. I'm trying to play the video after the data is loaded into the grid(DevExtreme.DataGrid). How do I do that?</p>
  <pre><code>var isLoaded = false;
          $.ajax({
              type: 'GET',
              url: '?handler=GetData&amp;StartTime=' + eventStartTime + '&amp;EndTime=' + eventEndTime,                
              success: function (response) {
                  var obj = jQuery.parseJSON(response);
                  var _dataGrid = $(&quot;#eventGridData&quot;).dxDataGrid(&quot;instance&quot;);
                  _dataGrid.option('dataSource', obj);
                  _dataGrid.reload();
                  _dataGrid.refresh();
                  isLoaded = true;
              },
              error: function (error) {
                  alert(&quot;Error: &quot; + error);
              }
          });
          //this needs to kick in after the data is loaded into the grid and I do a refresh(see above)
          if (isLoaded) {  
              //fetch matching video(by timestamp)
              playbackPlayer.connect({
                  address: '127.0.0.1',
                  port: '25200',
                  timestart: timestart from the first record of the datagrid,
                  timeend: timeend from the first record of the datagrid
              });
              playbackPlayer.play();
          }
  </code></pre>