title: Disable last rows in a gridview
body: <p>I have a gridview and i want to disable the last 5 rows of it how can i do it??below code is not working</p>
  
  <pre><code>  protected void gview_RowDataBound(object sender, GridViewRowEventArgs e)
    {
       if (e.Row.RowType == DataControlRowType.DataRow)
      {
            e.Row.Enabled = e.Row.RowIndex &lt;= 5; //for disabling last 4 rows 
      }
    }
  </code></pre>