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

[Solved] Number formatting in Ajax binding (doubles)

4 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dino
Top achievements
Rank 1
Dino asked on 10 Aug 2011, 07:29 PM
I see a few threads already open for this, but none opened recently. I was just wondering if this issue has been resolved...

e.g. In the case of doubles, if i am using a culture that uses a comma instead of a decimal, the formatting willl be taken care of automatically.

Or... is the solution to use a string property where the formatting has been applied manually...

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 11 Aug 2011, 08:06 AM
Hello Dino,

I'm not sure if I understood your question completely, however you may refer to this online example  for  a demonstration of globalization/localization and our grid component.

Regards,
Rosen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Costas
Top achievements
Rank 1
answered on 04 Feb 2012, 08:52 PM
Hello,
Currently i am using version 2011.3.1115.340 and i am facing the same issue. When i render a decimal value in grid, on server binding the format is the expected, but when i am trying to refresh the grid with ajax binding, the decimal separator, switches from "," to ".".
I have read in others posts that this is a known issue and i was wondering wether a fix is planned from your development team.

Thank you in advance for your answer.
Keep up the good work.

CM
0
Sven
Top achievements
Rank 1
answered on 12 Mar 2012, 04:34 PM
I have the same problem. The format of a numeric column (e.G. Format("{0:f3}") vanishes after an AJAX Request. Ist there any workaround? Will this problem be solved?

brgds
Sven Weiberg
0
Rosen
Telerik team
answered on 14 Mar 2012, 09:10 AM
Hello Sven ,

The f format specifier in number formatting is currently not support through ajax binding. However, you may achieve similar behavior by using custom formatting:

.Format("{0:#.000}");


All the best,
Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
Dino
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Costas
Top achievements
Rank 1
Sven
Top achievements
Rank 1
Share this question
or