printGridIsolated
Print a grid in isolation by hiding all other page content.
This function adds a temporary stylesheet that uses CSS to hide everything on the page except the target grid during printing. The grid stays in place with all its data (virtualization should be disabled separately).
function printGridIsolated(gridElement: HTMLElement, options: PrintIsolatedOptions): Promise<void>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
gridElement | HTMLElement | The tbw-grid element to print (must have an ID) |
options | PrintIsolatedOptions | Optional configuration |
Example
Section titled “Example”import { queryGrid } from '@toolbox-web/grid';import { printGridIsolated } from '@toolbox-web/grid/plugins/print';
const grid = queryGrid('tbw-grid');await printGridIsolated(grid, { orientation: 'landscape' });
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt