- Home
- Forum
- ASP.NET Core - EJ 2
- Change built-in toolbar label and tooltip
Change built-in toolbar label and tooltip
Hi,
This could be a simple request, but I haven't managed to find a solution.
I would like to change the text for the default toolbar items. For example, instead of showing Add, it should show New.
Thank you,
Andrei
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
RS
Rajapandiyan Settu
Syncfusion Team
July 20, 2020 04:09 AM UTC
Hi Andrei,
Greeting from syncfusion support.
Query : I would like to change the text for the default toolbar items
You can customize the default text in Grid by using localization. Please refer the below code example and sample for more information.
|
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource" allowPaging="true" locale="en-US" allowGrouping="true" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true"></e-grid-editSettings>
<e-grid-pagesettings pageCount="6"></e-grid-pagesettings>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" width="120"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer Name" width="150"></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" width="170"></e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" width="150"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script>
ej.base.L10n.load({
'en-US': {
'grid': {
// change the default text used in the grid as you want
'Add': 'New',
'Edit': 'Modify',
'Cancel': 'Back',
'Update': 'Save',
'Delete': 'Remove',
}
}
});
</script>
|
Note : en-US is the default locale applied to all the EJ2 Controls.
Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/core_locale_text1614930150.zip
Find the localization documentation for your reference.
Please get back to us if you need further assistance on this.
Regards,
Rajapandiyan S
Marked as answer
AN
Andrei
July 20, 2020 06:01 AM UTC
Hello,
Like I've said before: simple and easy solution. It worked.
Thank you for the support.
RS
Rajapandiyan Settu
Syncfusion Team
July 21, 2020 09:04 AM UTC
Hi Andrei,
We are glad that the provided solution resolved your requirement. Please get back to us if you need further assistance on this.
Regards,
Rajapandiyan S
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
AN Andrei
- Jul 17, 2020 11:40 AM UTC
- Jul 21, 2020 09:04 AM UTC