Globalisation problem "property does not exist"

Hey,

you suggest [locale]="de-DE" in your documentation.
This dosent work for me in two diffrent projects... locale="" (without " data source to view binding" sqare brackets) works fine.. Mabye other people have the same problem.


Why this is this? Is that my fault?


<ejs-grid
locale='de-DE'
[pageSettings]='pageOptions'
[contextMenuItems]="contextMenuItems"
[allowSorting]='true'
[editSettings]='editing'
[allowGrouping]='true'
(actionFailure)="onActionFailure($event)"
[dataSource]='customerGridData'>
<e-columns>
<e-column field='customerNumber' headerText='Kundennummer' width=40>e-column>
<e-column field='firstName' headerText='Vorname' textAlign='Left' width=90>e-column>
<e-column field='lastName' headerText='Nachname' textAlign='Left' width=90>e-column>
<e-column field='email' headerText='E-Mail' textAlign='Left' width=90>e-column>
e-columns>
ejs-grid>


import { Component, OnInit, ViewChild } from '@angular/core';
import { DataManager, WebApiAdaptor } from '@syncfusion/ej2-data';
import { environment } from 'src/environments/environment';
import {
GridComponent, ContextMenuService, PageService, ResizeService, SortService, GroupService, EditService,
EditSettingsModel, ContextMenuItem, PdfExportService, ExcelExportService, PageSettingsModel
} from '@syncfusion/ej2-angular-grids'
import { L10n, setCulture } from '@syncfusion/ej2-base';


setCulture('de-DE');

L10n.load({
'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'
},
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'
}
}
});


@Component({
selector: 'app-customer',
templateUrl: './customer.component.html',
styleUrls: ['./customer.component.scss'],
providers: [ContextMenuService, PageService, ResizeService, SortService, GroupService, EditService,
PdfExportService, ExcelExportService]
})
export class CustomerComponent implements OnInit {
public site = "Kunden";

constructor() { }

public pageOptions: PageSettingsModel;

public contextMenuItems: ContextMenuItem[] = ['AutoFit', 'AutoFitAll', 'SortAscending', 'SortDescending',
'Copy', 'Edit', 'Delete', 'Save', 'Cancel', 'FirstPage', 'PrevPage', 'LastPage', 'NextPage', 'Group', 'Ungroup'];
@ViewChild('grid')
public grid: GridComponent;
public editing: EditSettingsModel = { allowEditing: true, allowDeleting: true };

public customerGridData: DataManager;

//DataManager failure
onActionFailure(e: Error): void {
let error = JSON.stringify(e);
alert(error);
}

ngOnInit(): void {
this.pageOptions = { pageSize: 6 };
let token = sessionStorage.getItem("apiAuth-token");
this.customerGridData = new DataManager({
url: environment.apiURL + '/api/customer/index',
adaptor: new WebApiAdaptor(),
headers: [{ Authorization: 'Bearer '+token }],
});
}

}

1 Reply

JC Joseph Christ Nithin Issack Syncfusion Team June 30, 2022 12:45 AM UTC

Hi Philipp,


  Sorry for the late response.


  Before proceeding to the solution, we would like you to share the following information, so that we will be able to provide a better solution ASAP.


  • Please explain your exact issue you are facing in detail.
  • Please share the replication procedure for reproducing the issue you are facing.
  • Please share a simple sample to reproduce the issue.
  • Please share a video demo of the issue you are facing.


Please get back to us for further details.


Regards,

Joseph I.


Loader.
Up arrow icon