Culture specific number format without using Format()

2 posts, 0 answers
  1. Stefan
    Stefan avatar
    16 posts
    Member since:
    May 2018

    Posted 26 Sep 2018 Link to this post

    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?

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1187 posts

    Posted 27 Sep 2018 Link to this post

    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.
Back to Top