title: jqgrid undefined integer? pager not loading
body: <p>IM using jqgrids on mvc4, I need to get a simple list and display it using Ajax.</p>
  
  <p>When I load the page then grid starts an Ajax call, I have only 2 columns on grid, user_id and name.</p>
  
  <p>When the Json is loaded I get the next error on Google chrome: </p>
  
  <p><strong>Uncaught Typesetter: Cannot read property 'integer' of undefined</strong> </p>
  
  <p>and in firefox, firebug:</p>
  
  <p><strong>TypeError: b.jgrid.formatter is undefined</strong></p>
  
  <p>on jquery.jqGrid.src.js:122</p>
  
  <p>And the grid shows an "undefined" msg, also, the current pageer control isnt loading, but the data is</p>
  
  <pre><code> &lt;table id="GridUsuarios"&gt;&lt;/table&gt;
      &lt;div id="PagerUsuarios"&gt;&lt;/div&gt;
  
  
    &lt;script type="text/javascript"&gt; 
          $(document).ready(function() {
              jQuery("#GridUsuarios").jqGrid({
                  url: '@Url.Action("UsuariosGridData","Usuarios")',
                  datatype: "json",
                  myType: 'GET',
                  contentType: "application/json; charset-utf-8",                
                  colNames: ['Usuario', 'Nombre'],
                  colModel: [
                      { name: 'user_id', index: 'user_id', width: 90},
                      { name: 'nombre', index: 'nombre', width: 200}
                  ],
                  pager: '#PagerUsuarios',
                  rowNum: 10,
                  rowList: [10, 20, 30],
                  viewrecords: true,
                  height: 'auto',
                  sortname: 'nombre',
                  sortorder: 'desc',
                  caption: "Usuarios",
                  jsonReader: {
                      root: "rows",
                      total: "total",
                      page: "page",
                      records: "records",
                      repeatitems: false,
                      id: "user_id"
                  },
              });            
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>and my controller:</p>
  
  <pre><code>    public JsonResult UsuariosGridData(string sidx = "" , string sord = "", int page = 1, int rows = 10)
      {
          var resultado = db_hms.Users//.OrderByDescending(ur =&gt; ur.id_user)
                          .Join(db_hms.v_natural_person_short, ur =&gt; ur.id_employee, np =&gt; np.id_natural_person, (ur, np) =&gt; new { Users = ur, Natural_Person = np })//cambiar el idUser por idEmployee la relacion es alrevez XD                            
                          .Select(s =&gt; new { user_id = s.Users.id_user, nombre = s.Natural_Person.name_full })
                          .ToList();
  
  
  
          int vpage = page;
          int vrows = rows;  
          int counter = (int)Math.Ceiling((float)resultado.Count() / (float)vrows);            
          switch (sidx)
          {
              case "nombre":
                  {
                              if(sord == "desc")
                              {
                                  resultado = resultado.OrderByDescending(s =&gt; s.nombre).Skip(vrows * vpage).Take(vrows).ToList();
                              }
                              else
                              {
                                  resultado = resultado.OrderBy(s =&gt; s.nombre).Skip(vrows * vpage).Take(vrows).ToList(); ;
                              }
                      break;
                  }
              case "user_id":
                  {
                              if(sord == "desc")
                              {
                                  resultado = resultado.OrderByDescending(s =&gt; s.user_id).Skip(vrows * vpage).Take(vrows).ToList();
                              }
                              else
                              {
                                  resultado = resultado.OrderByDescending(s =&gt; s.user_id).Skip(vrows * vpage).Take(vrows).ToList();
                              }
                      break;
                  }
          }
          var retornar = new
          {
              total = counter,
              page = vpage,
              records = vrows,
              rows = resultado
          };
  
          return Json(retornar, JsonRequestBehavior.AllowGet);
  
      }
  </code></pre>
  
  <p>and a small json example:</p>
  
  <pre><code>{"total":101,"page":1,"records":303,
   "rows":[{"user_id":"titito","nombre":"EL bonito, tito "},
          {"user_id":"noro","nombre":"ElMoro, Noro "},
          {"user_id":"maka","nombre":"Martinez, Macanencio "}]}
  </code></pre>