Skip to content

Fill Handle

Enable fill alongside cellSelection to drag the fill handle at the bottom-right corner of a cell range (or call grid.fillCells) and replicate values across neighboring cells.

const grid = new Grid<Order>({
container,
columnDefs,
rowData,
getRowId: (row) => row.id,
cellSelection: { mode: 'range' },
fill: {
showHandle: true,
maxCells: 10_000,
},
});
grid.fillCells(
{ start: { row: { displayIndex: 0 }, colId: 'quantity' }, end: { row: { displayIndex: 0 }, colId: 'quantity' } },
{ start: { row: { displayIndex: 0 }, colId: 'quantity' }, end: { row: { displayIndex: 4 }, colId: 'quantity' } },
);
  • Tiling Behavior: Tiles values from the source rectangle repeatedly across the target rectangle (target must contain source).
  • Validation & History: Every written cell runs through the standard Value Pipeline (isEditable, valueParser, valueValidator, valueSetter) and records a single undoable batch when history is enabled.
  • Bounds & Exclusions: Rejects operations exceeding maxCells, extending outside visible current-page bounds, partially overlapping a cellSpan, or targeting synthetic/unavailable rows.