title: Get row index of second page of gridview
body: <p>I have taken a GridView with paging having <code>pagesize=10</code> but when i move to second page &amp; select 1st row of it then it shows the index as 11 despite 0 So please tell me how to resolve it.</p>
  
  <p>Here is what i tried so far:</p>
  
  <pre><code>protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
  {
        GridView1.PageIndex = e.NewPageIndex;
        BindGrid();
  }
  
  protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
  {
       int index = (Convert.ToInt32(e.CommandArgument));
       GridViewRow row = GridView1.Rows[index];
       //Some operation 
  }
  </code></pre>
  
  <p>When i try it for 11th row it throw error as:</p>
  
  <pre><code>Index was out of range. Must be non-negative and less than the size of the collection.
  Parameter name: index
  </code></pre>
  
  <p>if i mannually pass the value to <code>index=0</code> it works.</p>