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

Excel export question

2 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 16 Jul 2018, 05:13 PM

I have a kendo grid with no datasource specified. Items get added to the grid via a javascript function:

 

var grid = $("#MyGrid").data("kendoGrid");

grid.dataSource.insert(data);

 

After items are added to the grid, if I call grid.saveAsExcel(); nothing gets exported and the grid get's cleared out.

 

What approach should I use to get the data to export?

 

No server call should be needed for this at all. I just want to export the items that have been added via javascript.

 

2 Answers, 1 is accepted

Sort by
0
Marc
Top achievements
Rank 1
answered on 16 Jul 2018, 05:45 PM
I specified a datasource on the grid with no read operation and a serveroperation as false and the export seems to be working now.
0
Eyup
Telerik team
answered on 17 Jul 2018, 02:12 PM
Hi Marc,

I'm glad you've managed to find a solution for this specific scenario.
Generally, you can also check the local binding option of the grid:
https://demos.telerik.com/kendo-ui/grid/local-data-binding

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Marc
Top achievements
Rank 1
Answers by
Marc
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or