简体   繁体   中英

Telerik MVC Grid - Format number to Indian display format

I am struggling to get the Telerik MVC Grid to display number formatted according to Indian standards. Basically, I have a number, for example - 55555555555 and I want it to be displayed by Telerik MVC grid as 55,55,55,55,555. So I tried to use the pattern "##,##,##,##,###". This worked well for the above example. However, if I use 555555555 (two 5's less than the earlier example), then it displays as 555,555,555 instead of 55,55,55,555. I am not sure why this happens. How do I have a Telerik MVC grid display number according to Indian number formatting as mentioned at start?

You can localize all values on the grid by setting the .Localizable("hi-IN") on the grid itself.

Telerik MVC Grid Localization

There is a jquery globalization plugin available at https://github.com/jquery/globalize#format . That makes the task of formatting very easy particularly if the formatting is to be done at client side.

regards, Nirvan.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM