# SelectionMethods

Selection methods returned from useGridSelection.

Uses React context to access the grid ref - works reliably regardless of
when the grid mounts or conditional rendering.

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `selectAll` | <code>() =&gt; void</code> | Select all rows (row mode) or all cells (range mode). |
| `clearSelection` | <code>() =&gt; void</code> | Clear all selection. |
| `getSelection` | <code>() =&gt; <a href="/grid/plugins/selection/interfaces/selectionresult/">SelectionResult</a> &#124; unknown</code> | Get the current selection state. Use this to derive selected rows, indices, etc. |
| `isCellSelected` | <code>(row: number, col: number) =&gt; boolean</code> | Check if a specific cell is selected. |
| `setRanges` | <code>(ranges: <a href="/grid/plugins/selection/interfaces/cellrange/">CellRange</a>[]) =&gt; void</code> | Set selection ranges programmatically. |
| `getSelectedRows` | <code>() =&gt; TRow[]</code> | Get actual row objects for the current selection. Works in all selection modes (row, cell, range) — resolves indices against the grid's processed (sorted/filtered) rows. |
