Reputation: 55
In my gridview we are in need of changing the wording from Delete to Remove. Any ideas on how to do that? This is what I have...
<Columns>
<asp:BoundField DataField="FileName" />
<asp:BoundField DataField="id" Visible="False" />
<asp:BoundField DataField="purchase_id" Visible="False" />
<asp:CommandField ShowDeleteButton="True" />
</Columns>
Upvotes: 0
Views: 142
Reputation:
You can aslo use Template Field, if you need any kind of customization in your grid. In this example I have change command field to template field. Changing makes it more flexible to use.
<Columns>
<asp:BoundField DataField="FileName" />
<asp:BoundField DataField="id" Visible="False" />
<asp:BoundField DataField="purchase_id" Visible="False" />
<asp:TemplateField>
<Itemtemplate>
<asp:Button runat="server" id="btnDelete" CommandName="Delete" text="Remove"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
OR
In your case you can simply use DeleteText
as <asp:CommandField ShowDeleteButton="true" DeleteText="Remove" />
Upvotes: 0
Reputation:
Just set the DeleteText
:
<asp:CommandField ShowDeleteButton="true" DeleteText="Remove" />
Is that all you need?
Upvotes: 1