title: Showing serial number in jqgrid
body: <p>I want to show serial number as first column in <a href="http://jqgrid.com/" rel="nofollow">jqgrid</a>.since, database records doesn't has contigous 'ids', I can't use it.
  <br/>Is there any simple way to accomplish this? </p>
  
  <p><strong>Update</strong>:
  sample code:</p>
  
  <pre><code>$(document).ready(function()
    {    
      $("#list").jqGrid(
      {
        url:'&lt;%=Url.class_variable_get(:@@baseurl) %&gt;/address_books/show.json',
        datatype:'json',
        mtype:'get',
        colNames:['Id','Name','Email Id','Number'],
        colModel:[
          {name:'address_book_id',index:'address_book_id',sorttype:'int',sortable:true,width:100},
          {name:'name',index:'name',sortable:true,width:300},
          {name:'email',index:'email',sortable:true,width:265},
          {name:'number',index:'number',sorttype:'int',sortable:true,width:300},
        ],
        pager:$('#pager'),
        emptyrecords: "No Records to display",     
        pginput:true,
        pgbuttons:true,
        rowNum:10,
        rowList:[5,10,20,30],
        viewrecords:true,
        sortorder: "desc",
        //multiselect:true,
        loadonce:true,
        gridview:false,
        sortname:'name',
        caption: " Contacts List",
        jsonReader: {
          repeatitems : false,
          cell:"",
          id: "0"
        },
        height: 80
      });
  
      $("#list").jqGrid('navGrid','#pager',{edit:false,add:false,del:false,search:true},{multipleSearch:true});
  });
  </code></pre>