I havent touched a datagrid in a while
But here is what i do in a gridview control
instead of using a editcommandcolumn change it to a Template and add a button along with the command name.
*The syntax is not the same for a datagrid, but you can figure it out easy in VS
- <asp:TemplateField HeaderText="Delete">
-
<ItemTemplate>
-
<asp:LinkButton ID="lnlButtonDelete" runat="server" CommandName="DeleteFile" OnClientClick="return confirm('Are you sure?')" >Delete Image</asp:LinkButton>
-
</ItemTemplate>
-
</asp:TemplateField>