Skip to main content

Range Selection

Range selection adds spreadsheet-style rectangular cell selection to FdcProGrid. It is independent of row selection: row selection marks records for batch workflows, while range selection operates on a rectangular group of visible cells.

Enable range selection

FdcProGrid(
dataSet: orders,
rangeSelection: const FdcGridRangeSelection(),
)

The default configuration enables range selection, copy, paste, the range context menu, and single-value fill.

Configure clipboard behavior

FdcProGrid(
dataSet: orders,
rangeSelection: const FdcGridRangeSelection(
copy: true,
paste: true,
contextMenu: true,
fillSingleValue: true,
),
)

When fillSingleValue is enabled, pasting one clipboard value into a multi-cell range can fill every editable cell in that range.

Paste operations still respect normal grid and dataset editing rules. Read-only columns and cells that cannot be edited are not treated as writable targets.

Customize the overlay

const FdcGridRangeSelection(
borderColor: Color(0xFF2563EB),
backgroundColor: Color(0x1A2563EB),
borderThickness: 2,
)

The overlay configuration is local to the grid instance.

Interaction notes

Range selection is available while the dataset is in browse state. The feature is temporarily unavailable while detail rows are expanded, avoiding ambiguous interaction between a rectangular cell range and expanded row content.

Use row selection for actions such as exporting selected records or performing batch commands. Use range selection for cell-oriented clipboard and spreadsheet-style workflows.