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

Kendo DataSource Field Name

5 Answers 218 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Navin
Top achievements
Rank 1
Navin asked on 17 Aug 2012, 04:53 PM
Hello, My WCF Service return json format data where Field name contain space and dot,  which through error in kendo datasource.
Is there any other method to overcome this drawback?

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Aug 2012, 02:28 PM
Hello,

This is not supported and I am afraid there isn't any workaround. The field names should be valid JavaScript names.

Kind regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
AP
Top achievements
Rank 1
answered on 24 Jan 2013, 07:07 AM
Any updates on this front?

What isn't clear is why doesn't Kendo validate all such cases? Why make the developer process the field names, rather than Kendo doing it itself?

Related thread: http://www.kendoui.com/forums/dataviz/chart/cannot-provide-a-number-as-a-key-in-json---get-an-unexpected-number-error.aspx
0
Daniel
Telerik team
answered on 29 Jan 2013, 06:46 AM
Hello,

We do not validate the names or modify them because this will add an extra overhead which is not needed in most cases. The names should be valid identifiers for JavaScript.

Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mike
Top achievements
Rank 1
answered on 15 Nov 2016, 04:40 PM

I know that there's a fix for this on grids, by adding brackets (http://jsbin.com/evapes/3/edit?html,js,output) or using the "from" field (http://jsbin.com/xuheve/3/edit?html,js,output).

But is there a fix for charts?

I have this situation where I can't control the fields in my data and some contain dots ("U.S."). I've tried using brackets and the "fromField" to no avail. Is there a way to get this working in charts.
Here's a dojo. If I remove the dots from "U.S." it works, but with them it breaks.

http://dojo.telerik.com/@dmathisen/AXUNi

0
Daniel
Telerik team
answered on 18 Nov 2016, 06:45 AM
Hello Mike,

The from option seems to be working at least on my side. Please check this example and let me know if it works for you.

Regards,
Daniel
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Navin
Top achievements
Rank 1
Answers by
Daniel
Telerik team
AP
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Share this question
or