Skip to main content

Text Column

FdcTextColumn is the default single-line text column. It binds to FdcStringField and FdcGuidField, supports lookup workflows, and can optionally show a live character counter while the user edits the value.

Text column sample
Loading FDC sample…
FdcGrid(
dataSet: textRows,
options: const FdcGridOptions(autoEdit: true),
columns: [
FdcTextColumn(
fieldName: 'customer_code',
width: 140,
lookupIcon: Icons.search,
onLookup: openCustomerLookup,
),
FdcTextColumn(
fieldName: 'company_name',
width: 230,
showCounter: true,
),
const FdcTextColumn(fieldName: 'email', width: 250),
],
);

Key characteristics

  • Best for names, codes, email addresses, identifiers, and other single-line values.
  • Supports onLookup, lookupIcon, and lookupShortcut for application-defined search/resolve workflows.
  • Supports showCounter and counterStyle for length-aware editing.
  • Keeps formatting simple and text-oriented. For richer visuals, prefer FdcCustomColumn.

Character counter

Enable showCounter: true to show a live counter while the cell is being edited.

const FdcTextColumn<dynamic>(
fieldName: 'company_name',
label: 'Company',
width: 220,
showCounter: true,
)

This is especially useful when the underlying string field has a meaningful maximum length.

Lookup support

Text columns are a natural fit for lookup scenarios such as customer search, product search, or code resolution. The sample above wires the lookup button so you can immediately see the interaction.