title: how to populate jqGrid table using json
body: <p>I am creating a jqgrid from the json string "<a href="http://www.ok-soft-gmbh.com/jqGrid/John.txt" rel="nofollow">http://www.ok-soft-gmbh.com/jqGrid/John.txt</a>"</p>
  
  <p>I wrote the JavaScript similar to "<a href="http://www.ok-soft-gmbh.com/jqGrid/John.htm" rel="nofollow">http://www.ok-soft-gmbh.com/jqGrid/John.htm</a>" and <strong>url</strong> 
  pointing to the john.txt file.</p>
  
  <p>It is giving me a table without any rows. please help.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;title&gt;Demonstration how to read simple JSON text&lt;/title&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/redmond/jquery-ui.css" /&gt;
      &lt;link rel="stylesheet" type="text/css" href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-3.8.2/css/ui.jqgrid.css" /&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-3.8.2/js/i18n/grid.locale-en.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-3.8.2/js/jquery.jqGrid.min.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
          //&lt;![CDATA[
              jQuery(document).ready(function () {
                  $('#jqgrid').jqGrid({
                      url: 'http://www.ok-soft-gmbh.com/jqGrid/John.txt',
                      datatype: 'json',
                      colNames: ['Col1', 'Col2', 'Col3'],
                      colModel: [
                          { name: 'col1' },
                          { name: 'col2' },
                          { name: 'col3' }
                      ],
                      jsonReader: { repeatitems: false },
                      height: 'auto'
                  });
                  });
          //]]&gt;
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;table id="jqgrid"&gt;&lt;tr&gt;&lt;td/&gt;&lt;/tr&gt;&lt;/table&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>this is what my code is...<br>
  and this is what I am getting</p>
  
  <p><a href="http://tinypic.com/view.php?pic=vqps1x&amp;s=6" rel="nofollow">http://tinypic.com/view.php?pic=vqps1x&amp;s=6</a></p>