Skip to content

SelectionMethods

Selection convenience methods returned from injectGrid.

// Old (deprecated)
const grid = injectGrid();
grid.selectAll();
// New (recommended)
import { injectGridSelection } from '@toolbox-web/grid-angular/features/selection';
const selection = injectGridSelection();
selection.selectAll();
PropertyTypeDescription
selectAll() => void⚠️ Select all rows in the grid. Requires SelectionPlugin with mode: ‘row’.
clearSelection() => void⚠️ Clear all selection. Works with any SelectionPlugin mode.
getSelectedIndices() => Set<number>⚠️ Get selected row indices. Returns Set of selected row indices.
getSelectedRows() => TRow[]⚠️ Get selected rows data. Returns array of selected row objects.
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