views:

180

answers:

1

I'm using an asp:DetailsView control with auto generated "Edit" and "Insert" buttons. So far its been working reasonably well.

However the client has asked that the "Update" and "Insert" labels be changed to "Save".

At this point I can see two options:

  1. Trap the mode changes for the view and "find" the controls to modify them as appropriate.
  2. Don't auto generate the edit and insert buttons, and instead do all the button logic myself.

Both options seem like an annoying amount of work. Any other options? What do you recommend?

+2  A: 

It's been awhile, but I believe you can simply use a CommandField, and it will have the same effect as the auto-generated buttons.

<asp:CommandField ShowEditButton="True" ShowInsertButton="true" 
         EditText="Update" InsertText="Save"></asp:CommandField> 
womp
Yep. I needed <asp:CommandField ShowEditButton="true" ShowInsertButton="true" InsertText="Save" UpdateText="Save"/> Your memory serves me well :-)
Justicle