Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
how to determine if the grid is done fetching data from server
posted

I have a grid set up using xml load on demand set to background mode.  The grid currently fetches 50 rows at a time.  I'm trying to figure out how to detect on the client when the grid is done fetching all of the data from the server.

Thanks,

Eric

Parents
No Data
Reply
  • 1923
    posted

    Hi Eric,

    Listen for the AfterXmlHttpResponseProcessed client side event...something like the following:

    function UltraWebGrid1_AfterXmlHttpResponseProcessed(gridName) {

           // grid has finished loading the current set of data...

           // be extra clever and display to the user how many rows have actually been loaded
           var grid = igtbl_getGridById(gridName);
           var total = grid.RowsServerLength;
           var loaded = grid.RowsRetrieved;

          if (loaded < total) {
               alert(loaded + ' of ' + total + ' rows loaded');
          } else {
               alert('Grid has loaded all ' + total + ' rows');
          }

          return;

    }

Children
No Data