Q: JqGrid is not showing any data i have written this code.
<html>
  <head> 
    <title>My First JqGrid</title> 
    <script src="js/jquery-1.8.2.min.js"></script> 
    <link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui-1.7.2.custom.css" />  
  <script src="js/jquery.jqGrid.min.js"></script>  
  <link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /> 

  <script type="text/javascript">

  $(document).ready(function(){ 

   var obj;
   var mydata='[{"id":"1"},{"id":"2"}]';
   obj = JSON.parse(mydata); 

   $("#list").jqGrid({
        dataType: 'json',
        data :obj,
        colNames: ['id'], 
        colModel: [
                        { name: 'id', index: 'id', width: 120, sortable: true } 

          ], 
        autowidth: true,  
        viewrecords: true 
    });

   });
   </script>

 </head>
<body>
   <table id="list">
<tr>
  <td></td>
</tr>
   </table>  
</body>


Everything works fine. But I am unable to see the data. what might be the issue ?
Thanks in advance.

A: If you are using local data (as in a local array like you are above) then you need to change your datatype option to local. Also, keep in mind that this stuff is case-sensitive so in your case, you had dataType when in reality, it's datatype.
datatype: 'local'

Also, since you are using local data (an array) all you need to do is pass the array to jQGrid, you do not need to parse the array as JSON like you are above.
From the jQGrid Docs:
data:
An array that stores the local data passed to the grid. You can directly point to this variable in case you want to load an array data.
datatype
Defines in what format to expect the data that fills the grid. Valid options are xml (we expect data in xml format), xmlstring (we expect xml data as string), json (we expect data in JSON format), jsonstring (we expect JSON data as a string), local (we expect data defined at client side (array data))
