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

Databinding Error

2 Answers 58 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Bryan
Top achievements
Rank 1
Bryan asked on 06 Sep 2016, 07:39 PM

I get an "Invalid or unexpected token" error in the console when attempting to bind a datasource with any column that starts with a number or contains some non-standard characters (e.g., 360_Comment or Interview_&_Notes). Is there a fix forthcoming or a workaround I can do in the code without writing every cell value out myself?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 08 Sep 2016, 10:57 AM
Hello Bryan,

Binding the DataSource with a column that starts with a number or contains some non-standard characters is not supported out of the box from the Kendo UI Spreadsheet.

I can suggest using the schema.parse property of the DataSource for parsing the server response with valid data names:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.parse

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Bryan
Top achievements
Rank 1
answered on 08 Sep 2016, 02:42 PM
Doesn't the schema parse method (at least in the example) require looping through the response to rename all the keys in all the records? I've implemented it and it works, but it slows down the code considerably as opposed to filtering out those columns on the server side and binding the spreadsheet to the datasource directly. 
Tags
Spreadsheet
Asked by
Bryan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Bryan
Top achievements
Rank 1
Share this question
or