Allows printing Grid contents using browser print dialog.
This feature is based on PdfExport with only difference that instead of sending request to a backend it renders content to an IFrame element and requests print dialog for it. For more details about preparing HTML for printing, please refer to the PdfExport docs.
Usage
const grid = new Grid({
features : {
print : true
}
})
// Opens popup allowing to customize print settings
grid.showPrintDialog();
// Simple print
grid.print({
columns : grid.columns.map(c => c.id)
});
This feature is disabled by default. For info on enabling it, see GridFeatures.
Configs
37
Configs
37Export file config
Misc
Other
Properties
24
Properties
24Common
Class hierarchy
Other
Functions
36
Functions
36Other
This method is called when IFrame is loaded with all the HTML/CSS and is about to be printed. Use it to take control over the page contents.
| Parameter | Type | Description |
|---|---|---|
iframe | HTMLIFrameElement |
Print
Starts the print process. Accepts a config object which overrides any default configs. NOTE Component should not be interacted with when print is in progress
| Parameter | Type | Description |
|---|---|---|
config | PrintConfig |
Promise which resolves when printing is done. Optionally it might return an object with an
error key in it.