title: jqGrid pager only returning first page
body: <p>I want to have client side paging.  </p>
  
  <p>But for some reason, I only seem to get back the first page?  Even though I know I have two pages worth of data (IE... I step through my code, and I definitely have two...)...  What is more baffling is that my links to navigate through the pages never seem to be correct... For instance I would expect the following screen to say 1 of 2...</p>
  
  <p><img src="https://i.stack.imgur.com/CmY0S.png" alt="Paging Problems"></p>
  
  <p>Also I would expect the bottom right hand side to say View 1-15 of 21?
  My feeling is that I am doing something wrong in my data layer to give this pager it's info.
  So It only returns the first page.</p>
  
  <pre><code>    public static string JsonifyEnc(IEnumerable&lt;TemplateModel&gt; model, int popId, int page, int rows) {
          TemplateModel variable = model.ToArray()[0];
          ArrayList al = new ArrayList();
          //foreach (PatientACOModel patMod in variable.Template) {
          int i = 1;
          int rowstart = (page * rows + 1) - rows;
          int rowend = page * rows;
          //Here is where I create the rows... nothing special here
          var griddata = new {
              total = variable.Template.Count % rows &gt; 0 ? (variable.Template.Count / rows) + 1 : (variable.Template.Count / rows),
              page = page,
              records = al.Count,
              rows = al.ToArray()
          };
  </code></pre>
  
  <p>When I quick wath the total variable it says two?
  This would be the first part of my json string that is returned...</p>
  
  <pre><code>{"total":2,"page":1,"records":15,"rows":
  </code></pre>
  
  <p>So it's there.  Also, this is how I am building up my jqGrid...</p>
  
  <pre><code>    $(document).ready(function () {
          jQuery("#frTable").jqGrid ({
              cmTemplate: { sortable: false },
              caption: '@TempData["POPNAME"]' + ' Population',
              datatype: 'json',
              mtype: 'GET',
              url: '/Encounters/GetAjaxPagedGridData/', //'Url.Action("GetAjaxPagedGridData", "Encounters", new { popId = TempData["POPULATIONID"] })',//  
              postData: { popId: '@TempData["POPULATIONID"]'},
              pager: '#pager',
              jsonReader: {repeatitems: false},
              loadonce: true,
              height: 'auto',
              gridview: true,
              viewrecords: true,
              rowNum: 15,
              shrinkToFit: false,
              autowidth: true,
  </code></pre>