Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143407 | Mar 19,2019 12:17 PM UTC | Oct 23,2020 02:53 PM UTC | Angular - EJ 2 | 7 |
![]() |
Tags: Grid |
import { setCulture, setCurrencyCode } from "@syncfusion/ej2-base";
setCulture("pt");
setCurrencyCode("BRL");
<e-column field = 'ValueNF' [filter] = 'filter' headerText = 'Value NF' textAlign = 'Left' format= 'C2'></e-column>
|
<ejs-grid #grid [dataSource]='data' allowPaging='true' [allowPdfExport]='true' [toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'[allowResizing]="true">
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='120'></e-column>
<e-column field='Freight' headerText='Freight' type='number' width='120' format='C2'></e-column>
</e-columns>
</ejs-grid>
|
import * as cagregorian from "./ca-gregorian.json";
import * as currencies from "./currencies.json";
import * as numbers from "./numbers.json";
import * as timeZoneNames from "./timeZoneNames.json";
loadCldr(cagregorian, currencies, numbers, timeZoneNames); // load json files of pt
setCulture('pt'); // Change the Grid culture
setCurrencyCode("BRL"); // Change the currency code
export class DefaultComponent implements OnInit {
public data: Object[] = [];
@ViewChild('grid')
public grid: GridComponent;
public toolbar;
ngOnInit(): void {
this.data = orderDatas;
this.toolbar = ['PdfExport'];
}
toolbarClick(args): void {
switch (args.item.text) {
case 'PDF Export':
this.grid.pdfExport();
break;
}
}
}
|
import * as cagregorian from "cldr-data/main/pt/ca-gregorian.json";
import * as currencies from "cldr-data/main/pt/currencies.json";
import * as numbers from "cldr-data/main/pt/numbers.json";
import * as timeZoneNames from "cldr-data/main/pt/timeZoneNames.json";
import * as numberingSystems from 'cldr-data/supplemental/numberingSystems.json';
import * as gregorian from 'cldr-data/main/pt/ca-gregorian.json';
import {loadCldr} from '@syncfusion/ej2-base';
import { setCulture, setCurrencyCode } from "@syncfusion/ej2-base";
setCulture('pt'); // Change the Grid culture
setCurrencyCode("BRL"); // Change the currency code
loadCldr(numberingSystems['default'],cagregorian['default'],currencies['default'], gregorian['default'], numbers['default'], timeZoneNames['default']);
Output $12.00
import * as cagregorian from "./ca-gregorian.json";
import * as currencies from "./currencies.json";
import * as numbers from "./numbers.json";
import * as timeZoneNames from "./timeZoneNames.json";
import * as numberingSystems from "./numberingSystmes.json"
setCulture('pt'); // Change the Grid culture
setCurrencyCode("BRL"); // Change the currency code ( default BRL’s sign: R$ )
loadCldr(numberingSystems['default'],cagregorian['default'],currencies['default'], numbers['default'], timeZoneNames['default']); // load json files
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.