Skip to main content

Using the Grid

FdcGrid is designed for both pointer-driven use and keyboard-heavy business workflows. The current cell, current dataset record, editor state, and viewport movement are coordinated so navigation remains predictable while records are edited.

Move through cells and records

KeyAction
/ Move to the previous or next visible column.
/ Move to the previous or next record while keeping the current column context.
Home / EndMove to the first or last visible column in the current row.
Page Up / Page DownMove approximately one visible page of records.
Ctrl+Page Up / Ctrl+Page DownMove to the first or last record.
EnterMove forward through editable cells.
TabMove forward using the column tab order.
Shift+TabMove backward using the column tab order.

Enter and Tab both traverse editable cells, but Tab traversal honors each column's tabStop and focusOrder configuration. This lets a form-like grid skip calculated, read-only, or secondary fields during data entry.

FdcTextColumn<dynamic>(
fieldName: 'company_name',
focusOrder: 10,
tabStop: true,
)

Set tabStop: false for columns that should remain mouse-accessible but should not interrupt the normal keyboard entry sequence.

Start and control editing

KeyAction
Start typingWith autoEdit enabled, start editing the selected editable cell.
F2Enter or refocus cell editing and place the text cursor at the end where applicable.
SpaceToggle a boolean cell or activate a supported dropdown editor.
Backspace / DeleteClear the selected editable cell value when the grid cell owns focus.
EscapeCancel the active cell editor first; if no cell editor is active, cancel the dataset edit or insert state.

A grid configured for direct data entry commonly starts with:

const FdcGridOptions(
autoEdit: true,
)

When navigation leaves a modified row, the grid coordinates posting through the dataset lifecycle. Dataset validation and callbacks still determine whether the move may complete.

Insert a record at the current position

Press Insert while a grid cell owns focus and the dataset is in browse state.

The grid starts a dataset insert operation and focuses an editable field in the new row. Where possible, it keeps the current column; otherwise it moves to the first editable field.

The same operation is available from the grid main menu for pointer-driven workflows.

Append records at the end

Appending is integrated into normal keyboard traversal. When you leave the final editable cell of the final record with Enter or Tab, the current row is posted and the grid can append a new row, then focus the first editable field using the corresponding traversal order.

Arrow Down at the last existing record follows the same data-entry model and can append the next row. A pristine newly appended row is not repeatedly appended when Arrow Down is pressed again.

This makes continuous entry possible without leaving the grid to press a separate “New” button after every record.

The main menu also exposes an explicit append command when the dataset and grid state permit it.

Delete the current record

Press Ctrl+Delete while a grid cell owns focus to delete the current record.

When delete confirmation is enabled, the normal confirmation flow is used. A not-yet-posted inserted or appended row is canceled rather than treated as a persisted record deletion.

Cancel editing or a new record

Escape is intentionally layered:

  1. If a cell editor is active, the editor is canceled and the previous cell value is restored.
  2. If no cell editor is active but the dataset is in edit or insert state, the dataset operation is canceled.
  3. Pro range selection, when active, can also consume Escape to clear the selected range before normal dataset navigation continues.

This keeps cancellation local first and broader second.

Search from the keyboard

Use Ctrl+F on Windows/Linux or Cmd+F on macOS to focus the built-in toolbar search bar when the configured toolbar exposes one.

For example:

toolbar: const FdcGridToolbar(
items: <FdcGridItem>[
FdcGridMainMenuButton(),
FdcGridSearchBar(mode: FdcGridSearchBarMode.advanced),
],
),

Trigger lookup actions

A column with onLookup can be activated from the keyboard. The default lookup shortcut is F4.

FdcTextColumn<String>(
fieldName: 'customer_code',
onLookup: openCustomerLookup,
)

Columns may supply a custom lookupShortcut, or disable keyboard lookup activation by setting it to null.

Pointer interaction still uses the same dataset state

Clicking a cell activates the corresponding dataset record and cell. Editing, insert, append, post, cancel, validation, and delete operations continue to flow through FdcDataSet; keyboard and pointer input are two interaction paths over the same state model.

For the detailed grid reference, continue with Grid Overview and Keyboard Navigation.

Next: Editing Data