Pending Review
Last Updated: 27 Feb 2019 15:26 by Michael
Scott
Created on: 10 Feb 2017 19:02
Category: Spreadsheet
Type: Feature Request
2
Initialize spreadsheet based on schema/DataViewModel when instantiated with an empty datasource
Can the Spreadsheet widget be updated to initialize a sheet that is bound to a datasource when the datasource is an empty object?  

Generally, when a sheet is bound to a datasource, it is for the purpose of editing data, creating new rows and updating/deleting existing rows.  If a datasource comes back empty, the sheet isn't initialized.  So there are no column headers, which can be confusing to users when they don't know what data to enter in which columns.  The other thing is that the sheet itself is not fully initialize so that even if we assign column headers programmatically, when users start entering data, the UI becomes unresponsive and generates a javascript error: Uncaught TypeError: Cannot read property 'indexOf' of undefined
    at r.set (kendo.all.js:4586)
    at r.set (kendo.all.js:4760)
    at kendo.all.js:127702
2 comments
Michael
Posted on: 27 Feb 2019 15:26

OK, looks like they know this is an issue.  From their Spreadsheet databinding page:

Known Issues

  • Records cannot be edited after sorting the sheet.
  • The data of the DataSource to which the Spreadsheet will be bound has to contain data items. Binding the widget to a DataSource with empty data leads to undesired side effects.

I passed in a dataset with a blank record and it worked, not sure if that's something you can try.

Michael
Posted on: 27 Feb 2019 15:14
Yes!  I am encountering this exact issue!  Have you found a solution or gotten any feedback?