cloudscode / extjs4-ux-gridprinter

Ext.ux.GridPrinter pluging ported to ExtJS 4

Home Page:http://loianegroner.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ext.ux.grid.Printer

Overview

Ext.ux.grid.Printer is a small library that provides a way of printing Ext Grid Component.

Installation

Place the folder ux/grid in your project.

Usage

In your application file, please add:

Ext.Loader.setConfig({enabled: true});

Ext.require([
    'Ext.ux.grid.Printer',
]);


Ext.ux.grid.Printer.print just take a single argument - a normal grid instance. Use it like this:
var myGrid = new Ext.grid.GridPanel({
  //your usual grid config here
});

Ext.ux.grid.Printer.print(myGrid);

Example

Open example.html to see how to use it.

Custom Options

You can customize some options:

  • Ext.ux.grid.Printer.printAutomatically = false; – to disable the automatic printing (the print window will not open, user will only see the print version of the grid).
  • Ext.ux.grid.Printer.stylesheetPath = ‘/some/other/path/gridPrint.css’; – to change the path of the css file.

You need to set the custom config before calling Ext.ux.grid.Printer.print function.

Demo

Demo: http://loianegroner.com/extjs/examples/extjs4-ux-gridprinter/

Authors

Plugin originally developed by Ed Spencer (Ext JS 3.x)

Plugin ported to Ext JS 4 by Loiane Groner

About

Ext.ux.GridPrinter pluging ported to ExtJS 4

http://loianegroner.com