- Home
- Forum
- JavaScript - EJ 2
- Grid globalization
Grid globalization
Hi. Please provide a working example of grid globalization for the Blazor Server App. Examples from documentation do not work. Syncfusion.EJ2.Blazor 17.3.0.27 .NET Core 3.1.
SIGN IN To post a reply.
5 Replies
RS
Renjith Singh Rajendran
Syncfusion Team
November 19, 2019 06:42 AM UTC
Hi Costa,
We are sorry for the inconvenience caused.
We suggest you to ensure to add the below highlighted namespace in your application. We have missed this namespace in our documentation. We will update these changes in our documentation and will refresh online.
|
@using Microsoft.JSInterop
@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Grids
<EjsGrid DataSource="@Orders" ...>
...
</EjsGrid>
@code{
[Inject]
IJSRuntime JsRuntime { get; set; }
...
protected override void OnAfterRender(bool firstRender)
{
this.JsRuntime.Ejs().LoadLocaleData("wwwroot/locale.json").SetCulture("de");
}
}
|
Note : And also ensure to provide the proper path for the “locale.json” file. In the above code, we have contained a “locale.json” file inside the “wwwroot” folder.
We have prepared a sample based on this, please download the sample from the link below,
If you are still facing difficulties, we need more details to further proceed on this, kindly share with us the following details for better assistance.
- Share the details of the problem or script error you are facing.
- Share a video demo showing the problem you are facing.
- Share the type of application you are using. (Blazor WebAssembly Client or Blazor Server Side)
The provided information will help us analyze the problem, and provide you a solution as early as possible.
Regards,
Renjith Singh Rajendran.
CO
Costa
November 19, 2019 09:13 AM UTC
Thanks. Looks like I haven't read the documentation carefully. Everything works as it should.
RS
Renjith Singh Rajendran
Syncfusion Team
November 20, 2019 05:25 AM UTC
Hi Costa,
Thanks for your update.
We are happy to hear that the provided solution helped to achieve your requirement.
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran.
HA
Halber Albarracin
March 7, 2021 02:45 AM UTC
HI, do you have an example with ej2 .net core 2.2 ?
I tried but not works
thanks
SM
Shalini Maragathavel
Syncfusion Team
March 8, 2021 01:24 PM UTC
Hi Costa,
Thanks for the update.
Based on your query we have prepared sample for Grid with localization in .net core 2.2 version . Please refer the Code example for your reference
|
<ejs-grid id="Grid" allowPaging="true" allowGrouping="true" locale="de-DE" allowExcelExport="true" toolbar="@(new List<string>() { "ExcelExport", "Add", "Edit", "Delete", "Update", "Cancel" })">
<e-grid-columns>
. . .
</e-grid-columns> </ejs-grid>
<script>
ej.base.L10n.load({s
'de-DE': {
'grid': {
'EmptyRecord': 'Keine Aufzeichnungen angezeigt',
'GroupDropArea': 'Ziehen Sie einen Spaltenkopf hier, um die Gruppe ihre Spalte',
'UnGroup': 'Klicken Sie hier, um die Gruppierung aufheben',
'EmptyDataSourceError': 'DataSource darf bei der Erstauslastung nicht leer sein, da Spalten aus der dataSource im AutoGenerate Spaltenraster',
'Item': 'Artikel',
'Items': 'Artikel',
'Excelexport':'Exportia excel'
},
'pager': {
'currentPageInfo': '{0} von {1} Seiten',
'totalItemsInfo': '({0} Beiträge)',
'firstPageTooltip': 'Zur ersten Seite',
'lastPageTooltip': 'Zur letzten Seite',
'nextPageTooltip': 'Zur nächsten Seite',
'previousPageTooltip': 'Zurück zur letzten Seit',
'nextPagerTooltip': 'Zum nächsten Pager',
'previousPagerTooltip': 'Zum vorherigen Pager'
}
}
});
</script> |
Please find the below sample for more information.
Documentation : https://ej2.syncfusion.com/aspnetcore/documentation/grid/global-local/#localization
Please get back to us if you need further assistance with this.
Please get back to us if you need further assistance with this.
Regards,
Shalini M.
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
CO Costa
- Nov 18, 2019 12:26 PM UTC
- Mar 8, 2021 01:24 PM UTC