GridView

S

Samuel

I have the following code or a delete button in the GridView Control and the RowDeleteing event is not raised

Can anyone sugget hat is wrong with the code?

<asp:TemplateField>

<ItemTemplate>

<asp:LinkButton ID="delete" Runat="server"

OnClientClick="return confirm('Are you sure you want to delete this record?');"

CommandName="Delete" Text="Delete"/>

</ItemTemplate>

</asp:TemplateField>
 
E

Eliyahu Goldin

Try using a commandfield column instead of the templatefield with a
linkbutton.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


I have the following code or a delete button in the GridView Control and the
RowDeleteing event is not raised
Can anyone sugget hat is wrong with the code?
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="delete" Runat="server"
OnClientClick="return confirm('Are you sure you want to delete this
record?');"
CommandName="Delete" Text="Delete"/>
</ItemTemplate>
</asp:TemplateField>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top