7
Answers

GridView Row Button_Click database table updatevalue

Sanjay Kumar

Sanjay Kumar

11y
942
1
Hi

how to active & deactive two Button and Button_Click  update value database in GridView

 <asp:GridView ID="grdUserList" runat="server" AutoGenerateColumns="False" DataKeyNames="UserID" OnRowCommand="grdUserList_RowCommand" >
<Columns>
<asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" ReadOnly="True" SortExpression="UserID" />
<asp:TemplateField HeaderText="CurrentStatus">
<ItemTemplate>
<table>
<tr>
<td align="center" style="width: 78px">
<asp:Button ID="Button2" runat="server" Text="Active" /></td>
<td align="center" style="width: 76px">
<asp:Button ID="Button3" runat="server" Text="Deactive" /></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>



Answers (7)