Book Image

Mastering ExtJS - Second Edition

By : Loiane Avancini
Book Image

Mastering ExtJS - Second Edition

By: Loiane Avancini

Overview of this book

Table of Contents (19 chapters)
Mastering Ext JS Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Printing GridPanel content with the GridPrinter plugin


The next functionality we will implement is printing the contents of the GridPanel. When the user clicks on the Print button, the application will open a new browser window and display the contents of the grid in this new window.

To do this, we will use a plugin named Ext.ux.grid.Printer, which receives the GridPanel reference to be printed, gets the information that is on the Store, generates HTML from this content, and displays the information in a new window.

Note

The GridPrinter 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 GridPanel Store, meaning if you are using the PagingToolbar, the plugin will only generate the HTML of the current page. The plugin also supports the RowExpander plugin. Please feel free to contribute to this plugin (or any other Ext JS plugin), and this way, we can help in growing the Ext JS community...