Specify the ImageButton with CommandName="Delete" attribute.
<asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" .../>
CommandNames Cancel, Delete, Edit, NextPage, Page, PrevPage, Select, Sort
and Update correspond to the same action with the DataGrid (DataGrid has
these command names predefined for cthese actions)
See docs for further details.
--
Teemu Keiski
ASP.NET MVP, Finland
"Lars Netzel" <ui****@adf.se> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi
I had a Delete Column in a datagrid that was a Linkbutton. That needed to
change into a ImageButton because of the design demands in the project.
Then how do I trigger the DeleteCommand with that button?
I don't want to have to add a AddHandler in the ItemCreated or
ItemDataBound for this ImageButton cause then I can't get the ID from the
Row to delete as easy...
please help/
Lars Netzel