The next functionality we will implement is to print the contents of the Grid panel. When the user clicks on the Print button, the application will open a new browser window and display the contents of the Grid on this new window.
To do this, we will use a plugin named Ext.ux.grid.Printer
, which receives the Grid panel reference to be printed, get the information that is in the store and generate HTML from this content and display on a new window.
Tip
The Grid printer plugin is a third-party plugin available at https://github.com/loiane/extjs4-ux-gridprinter. This plugin will only print the information that is available on the Grid panel's store, meaning if you are using the paging toolbar, the plugin will only generate the HTML of the current page. The plugin also supports the Row Expander plugin. Please feel free to contribute to this plugin (or any other Ext JS plugin) and in this way we can help growing the Ext JS community.
After...