Hi I need help implementing a logic using Gridview control in c#.
I have a gridview and it has many rows. Each row has a Button to click for the user. On each button click i am updating the selected record in the database. Now once row is updated, I need to hide that button to prevent reaction just for that particular row.
1. If i use this
<asp:CommandField ShowEditButton="True" EditText="select" />
, I can't make this hide. 2. If I use this
<asp:TemplateField HeaderText="Your Action">
<ItemTemplate>
<asp:Button
ID="btnAccept"
runat="server"
Text="Accept"
OnClientClick="return confirm('Are you sure you want to Accept this offer?');"
onclick="btnAccept_Click" />
</ItemTemplate>
</asp:TemplateField>
, I can't get the selected row index.
I hope i have cleared what i wanna ask. Thanks in advance.