title: Updating totalItems in angular-ui-grid with external
body: <p>I am using external pagination in AngularJS's ui-grid as described here:</p>
  
  <p><a href="http://ui-grid.info/docs/#/tutorial/314_external_pagination" rel="nofollow">http://ui-grid.info/docs/#/tutorial/314_external_pagination</a></p>
  
  <p>That updates a special field of totalItems when new page is arrived:</p>
  
  <pre><code>var getPage = function() {
  // skipped some part
  $http.get(url)
  .success(function (data) {
    $scope.gridOptions.totalItems = 100;
    // updating grid object with data
  });
  </code></pre>
  
  <p>};</p>
  
  <p>My only difference to the standard example is that I have gridOptions inside an object that is passed to my directive, that has a grid inside it:</p>
  
  <pre><code>// Line is called right after I receive a page of data from server
  $scope.gridObj.gridOptions.totalItems= response.TotalItems;
  </code></pre>
  
  <p>If I initialize this field before grid is shown on screen (together with configuration) then it remains at the value that I set back then (and obviously, it is not adequate to set of data I receive later, during runtime). But when I alter it later after I call my loading method (that returns current "page" as well as value for totalItems), the change is not picked up by ui-grid. If it is not initialized at startup, again, I could not set this to any value.</p>
  
  <p>How am I to successfully modify the totalItems parameter for the ui-grid during runtime? Can I possibly re-trigger some grid update manually?</p>