Skip to main content

Grid Sorting

Sorting grid
Loading FDC sample…
FdcGrid(
dataSet: customers,
columns: customerColumns,
options: const FdcGridOptions(
readOnly: true,
allowColumnSorting: true,
),
);

Interactive grid sorting uses the dataset sort pipeline. For local datasets the in-memory view is reordered; for adapter-backed paging, supported sort descriptors are sent through the adapter query path.

Global sorting policy

FdcGrid(
dataSet: customers,
options: const FdcGridOptions(
allowColumnSorting: true,
),
)

Disable sorting for one column

const FdcTextColumn<dynamic>(
fieldName: 'notes',
allowSort: false,
)

Clear grid-managed sorting

await controller.clearSorting();

Programmatic sort state is documented in DataSet Sorting.