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

Best practice for manually loading data from database

1 Answer 219 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 12 Feb 2019, 06:10 PM

I've created a spreadsheet in a View that is somewhat complex. The first 10 rows are frozen and function as an informational header to the data which is in rows 11 and greater. The header has merged cells and labels for data. For example, it's a time card spreadsheet and row 1 has just the employee name with the label for the name just to the left of it. I am assuming I can't use a datasource because the spreadsheet is not a simple column/row display of data. What is the best practice to load a spreadsheet like this with data read from the database?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 15 Feb 2019, 04:42 PM
Hello Mark,

I suggest that you perform you own AJAX request for the database information and use the range.values() method to set it in the spreadsheet: https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/values

Here's also how to create the desired range object: https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/sheet/methods/range.

You can also show a kendo.ui.progress() over the spreadsheet while the data is loading so the end user does not modify it and lose data. You can show it before initiating the request, and hide it in the success/fail callbacks. Here's documentation and examples about it: https://docs.telerik.com/kendo-ui/api/javascript/ui/ui/methods/progress.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Spreadsheet
Asked by
Mark
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or