How to format currency column with Euro or pound sterling

1 Answer 685 Views
Grid Localization
Tera
Top achievements
Rank 1
Iron
Iron
Tera asked on 04 May 2023, 02:40 PM

how to change the dollar label to that of the local currency.

With i18n dynamically


<kendo-grid-column class="price-col" field="price" title="Price" [width]="80">
        <ng-template kendoGridHeaderTemplate let-dataItem>
            Price
            <span class="grid-header-subtitle">(Intraday)</span>
        </ng-template>
        <ng-template kendoGridCellTemplate let-dataItem>
            {{ dataItem.price | currency: 'EUR' }}
        </ng-template>
    </kendo-grid-column>

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 08 May 2023, 09:00 PM

Hello Tera,

We have a dedicated article to change the locales dynamically. Using this example, dynamically change the currency in the Kendo UI Grid using either the kendoNumber pipe or the formatNumber method. For example:

<kendo-grid-column field="UnitPrice" title="Price">
  <ng-template kendoGridCellTemplate let-dataItem>
    {{ dataItem.UnitPrice  | kendoNumber:'c':localeId }} <br />
    {{ intlService.formatNumber(dataItem.UnitPrice, "c") }}
  </ng-template>
</kendo-grid-column>

In this StackBlitz example, the currency format of the Price column in the Grid can be changed dynamically.

I hope this information helps. Please let me know if I can further assist you with currency formatting.

Regards,
Hetali
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Grid Localization
Asked by
Tera
Top achievements
Rank 1
Iron
Iron
Answers by
Hetali
Telerik team
Share this question
or