title: Disable button inside a GridView TemplateField
body: <p>I have the following gridview control </p>
  
  <pre><code>&lt;asp:Panel runat="server" ID="pnlBeforeSave" Visible="true"&gt;
  &lt;asp:GridView ID="gvP" runat="server" AutoGenerateColumns="false" AllowPaging="false"
    AllowSorting="false" CssClass="list-table" HeaderStyle-CssClass="header"&gt;
    &lt;Columns&gt;
  
    &lt;asp:TemplateField HeaderText="Action" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Center"
    ItemStyle-CssClass="unsortable"&gt;
    &lt;ItemTemplate&gt;
    &lt;input id="btnPay" type="button" onclick="javascript:OpenEditPaymentItemDialogPage('&lt;%# Eval("PmtId") %&gt;');"
     value="Edit" class="button save" style="width: 80px" /&gt;
     &lt;/ItemTemplate&gt;
     &lt;/asp:TemplateField&gt;
     &lt;/Columns&gt;
     &lt;/asp:GridView&gt;
  &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>After I save the griview dataset to Database I have to disable the griview.
  but btnPay still enabled. I need to do it from code behind
  Any idea?</p>