Per the recent thread, Excel export is still not working correctly.
I added
config.toolbar = ["excel"]
to Init Script, and it immediately showed a new non-aware export Button.
But at runtime, clicking that button does nothing.
And since I was using a custom header on my grid, I found a post to add this:
Code: Select all
<a class="k-button k-button-icontext k-grid-excel" href="#"><span class="k-icon k-i-excel"></span>Export to Excel</a>
<a class="k-button k-button-icontext k-grid-pdf" href="#"><span class="k-icon k-i-pdf"></span>Export to PDF</a>
Then, a post that talked about this:
But that syntax, using "container" doesn't work in Aware... there is no "container", so thats got to be "this" or "widget" or something... working on it.Yes, the Excel configuration of the grid does not depend on the toolbar command. The only requirement is to add the k-grid-excel class to the excel export command as the click event is attached as follows:
container.on(CLICK + NS, ".k-grid-excel", function(e) {
e.preventDefault();
that.saveAsExcel();
});
Exporting to Excel is such a basic function in software today, its surprising that its so difficult to get this working from a grid to allow the user to get his data out of the db.