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

kendo-grid: wrong currency parse (angular, odata)

1 Answer 112 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Enrico
Top achievements
Rank 1
Enrico asked on 06 Jul 2016, 06:44 PM

Hi,

I'm using a kendo-grid (from kendo 2015.1.429) with angularjs (v 1.2.27) and odata (asp net web api 2).

I've a field that is declared as type: 'number' the culture used is it-IT both for client and server (I've included kendo.culture.it-IT.min.js and set JsonFormatter serialization settings properly).

The grid does not allow to insert a "." but only "," as decimal separator (that is correct) but when I try to save data, those are posted to my controller and deserialized losing the decimal. So for example 7,22 become 722.

Am I doing something wrong? Is there a known bug?

Thanks,

Enrico

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 08 Jul 2016, 02:20 PM
Hello Enrico,

The described behaviour when the sent data is not correctly formatted is not a known issue.

Please check the required steps to set matching cultures on the client and the server:

1) the server-side culture of the application must be set, according to the HTTP headers sent by the end-user's browser (e.g. Accept-Language). If using ASP.NET MVC, this should happen in the overridden Initialize method of the Controller.

http://docs.telerik.com/kendo-ui/aspnet-mvc/globalization#match-cultures

2) Depending on the culture set in point (1), the corresponding Kendo UI culture script file should be registered on the page on the client

3) Depending on the culture set in point (1), the same culture should be set via the kendo.culture() method on the client, before any Kendo UI widgets are created.

http://docs.telerik.com/kendo-ui/framework/globalization/overview#define-current-culture

Also, I noticed that the mentioned AngularJS version is not the required one for the used version of Kendo UI:

http://docs.telerik.com/kendo-ui/intro/installation/prerequisites#angularjs

If this is not helpful, please provide a runnable example that reproduces the issue so we can investigate it further.


Regards,
Stefan
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
Grid
Asked by
Enrico
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or