title: How do I update the data in jsGrid without the ability to use AJAX in the loadData() controller? (The array isn't finished populating yet)
body: <p>I can display static data <code>data: ary</code> and I'm successful with updating, deleting, inserting, and filtering said static data:</p>
  
  <pre><code>controller: {
  
      loadData: function (filter) {
  
          return $.grep(ary, function (obj, index) {
              return
              /* conditional logic for filtering here */
          });
  
      },
  
      updateItem: function (item) {
  
          //call custom framework function responsible for updating record
          appName.doRequest("updateRecord");
  
      },
  
      insertItem: function (item) {
  
          //call custom framework function responsible for inserting record
          appName.doRequest("insertRecord");
  
      },
  
      deleteItem: function (item) {
  
          //call custom framework function responsible for deleting record
          appName.doRequest("deleteRecord");
  
      },
  
  },
  </code></pre>
  
  <p>Please note, <code>ary</code> is a global variable. Basically, I can update <code>ary</code> anytime I want through our custom framework; however, it must be outside of the jsGrid controllers, or the array ends up empty.</p>
  
  <p>Why do I have to call the function responsible for populating the array whilst <em>outside</em> of <code>loadData()</code> in order for the array to become accessible?  How do I get my array to be available inside of <code>loadData()</code> when I call my company's special function?</p>
  
  <p>The documentation says I can use AJAX requests with deferments/promises, but I don't believe our framework will allow for me to make direct AJAX requests to the backend.</p>
  
  <p>Here's a snippet of the framework: </p>
  
  <pre><code>case "getJobSpecs":
      var jsonString, ary = [];
      var jsonString = $(data.xmldata).find("tblJobSpecs").text();
      ary = JSON.parse(jsonString);
  
      //results from server.  I can do anything to the DOM I want here
      break;
  
  case "updateRecord":
      console.log(data.xmldata);
      //results from server.  I can do anything to the DOM I want here
      break;
  case "insertRecord":
      console.log(data.xmldata);
      //results from server.  I can do anything to the DOM I want here
      break;
  case "deleteRecord":
      console.log(data.xmldata);
      //results from server.  I can do anything to the DOM I want here
      break;
  </code></pre>