title: Uncaught TypeError: Cannot read property 'rows' of null (I have not found a solution)
body: <p>I have a <code>GridView1</code></p>
  
  <p><a href="https://i.stack.imgur.com/9NKYZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9NKYZ.jpg" alt="This is my Page and the gridview is filled "></a></p>
  
  <p><a href="https://i.stack.imgur.com/BdQ8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BdQ8R.png" alt="This how it looks like in the bowser"></a></p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server"&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I have filled the <code>gridview1</code> in my c#</p>
  
  <pre><code>DataTable dt = GetTable(sSavePath, strFileType);
  GridView1.DataSource = dt;
  GridView1.DataBind();
  </code></pre>
  
  <p>This is my code for JavaScript</p>
  
  <pre><code>function rowno(rowindex) {
    var i, CellValue, Row, td;
    i = parseInt(rowindex) + 1;
  
    var table = document.getElementById('&lt;%= GridView1.ClientID %&gt;');
  
    Row = table.rows[i];
    td = Row.cells[1];
  
    CellValue = td.children[0].attributes[0].value;
    console.log(CellValue);
    window.alert(CellValue);
    return false;
  }
  </code></pre>
  
  <p>here I'm calling the rowno function
  <code>s</code> is the rowindex </p>
  
  <pre><code>Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"Server Time", "javascript:rowno('"+s+"');", true);
  </code></pre>
  
  <p>and I'm getting this error</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'rows' of null at rowno</p>
  </blockquote>
  
  <p>any ideas?</p>