Databinding Error

3 posts, 1 answers
  1. Bryan
    Bryan avatar
    28 posts
    Member since:
    Oct 2014

    Posted 06 Sep Link to this post

    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. Answer
    Stefan
    Admin
    Stefan avatar
    264 posts

    Posted 08 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Bryan
    Bryan avatar
    28 posts
    Member since:
    Oct 2014

    Posted 08 Sep in reply to Stefan Link to this post

    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. 
Back to Top