This is a migrated thread and some comments may be shown as answers.

Culture specific number format without using Format()

1 Answer 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Stefan asked on 26 Sep 2018, 06:38 AM

As far as I know I have to reference JS-library 'kendo.culture.de-DE.min.js' and afterwards execute 'kendo.culture("de-DE")' to use culture specific formatting, even when using the MVC wrappers, right?

But do we actually have to use the Format() function for every field (numeric column in a grid) to show the correct number format? Why does it not apply the format automatically after already setting the kendo culture? Or do I have to tell kendo otherwise?

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 27 Sep 2018, 01:26 PM
Hi Stefan,

While displaying the values of the item fields the Grid will simply executes the toString() JavaScript method. It will not take into account the type configured in the DataSource Model for that field. That is why, in order to format the numerics properly according to the current Kendo culture, you would need to use the Format("{0:n}") configuration method for that respective column of the Grid.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or