title: Enabling And Disabling Buttons In GridView
body: <p>I have added a button column to a gridview. I am populating the gridview with a datable through code then binding the datable to the grid. </p>
  
  <p>I need to now look at the first column of the data and check if the text of the column is "NA" if it is the button in that column has to be disabled.....</p>
  
  <p>How can I accomplish this? I am populating the data from code and the button is preadded to the grid in the markup</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand"&gt;
      &lt;Columns&gt;
          &lt;asp:ButtonField Text="Delete" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  
  
  GridView1.DataSource = dt;
  GridView1.DataBind();
  </code></pre>