The first capability we are going to implement is to export the contents of a Grid panel to PDF and Excel. We will implement these features for the Films Grid panel we implemented in the last chapter. However, the logic is the same for any Grid panel you may have in an Ext JS application.
The first thing we are going to do is to add the export buttons to the Grid panel's toolbar. We will add three buttons: one to Print the contents of the Grid panel (we will develop this feature later, but let's add this button right now), one button to Export to PDF and one button to Export to Excel:
Remember that in the last chapter we created a toolbar named AddEditDelete
that we used for the Grid panels? We are going to add these three buttons on this toolbar:
Ext.define('Packt.view.toolbar.AddEditDelete', { extend: 'Ext.toolbar.Toolbar', alias: 'widget.addeditdelete', items: [ // Add Edit and Delete Buttons { xtype: 'tbseparator...