# printGridIsolated

> _Since v1.4.0_

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).

```ts
function printGridIsolated(gridElement: HTMLElement, options: PrintIsolatedOptions): Promise<void>
```

## Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `gridElement` | <code>HTMLElement</code> | The tbw-grid element to print (must have an ID) |
| `options` | <code><a href="/grid/plugins/print/interfaces/printisolatedoptions/">PrintIsolatedOptions</a></code> | Optional configuration |

## Example

```typescript
import { queryGrid } from '@toolbox-web/grid';
import { printGridIsolated } from '@toolbox-web/grid/plugins/print';

const grid = queryGrid('tbw-grid');
await printGridIsolated(grid, { orientation: 'landscape' });
```
