If you want to customize this row then instead of using the CommandField use
a TemplateField where you define any or all of the ItemTemplate,
EditItemTemplate or InsertItemTemplate as required.
In each template you can add LinkButtons with the desired CommandNames for
each template. For example, within the ItemTemplate, you would add:
<asp:LinkButton Text="Edit" runat="server" ID="Edit"
CommandName="Edit"></asp:LinkButton>
<asp:LinkButton Text="Insert" runat="server" ID="Insert"
CommandName="New"></asp:LinkButton>
In the EditItemTemplate, you would add:
<asp:LinkButton ID="UpdateButton" runat="server" CommandName="Update"
Text="Update"></asp:LinkButton>
<asp:LinkButton ID="btnCancel" CausesValidation="false" runat="server"
CommandName="Cancel" Text="Cancel"></asp:LinkButton>
and in the InsertItemTemplate you would add:
<asp:LinkButton ID="btnInsert" runat="server" CommandName="Insert"
Text="Insert"></asp:LinkButton>
<asp:LinkButton ID="btnCancel" runat="server" CausesValidation="false"
CommandName="Cancel" Text="Cancel"></asp:LinkButton>
This would mimic the action performed by the CommandField (which renders all
those buttons for you based on which property you set to true (e.g.
ShowEditButton=true would render the LinkButton with CommandName="Edit" that
we did above)
But by doing this in templates you get the opportunity to customize the
layout of the DetailsView where you can add now within that templateField the
Button or Link that you asked to add.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com