stackedHeaderRows property

List<StackedHeaderRow> stackedHeaderRows

The collection of StackedHeaderRow.

Stacked headers enable you to display headers that span across multiple columns and rows. These rows are displayed above to the regular column headers.

Widget build(BuildContext context) {
  return SfDataGrid(source: _employeeDataSource, columns: <GridColumn>[
    GridColumn(columnName: 'id', label: Text('ID')),
    GridColumn(columnName: 'name', label: Text('Name')),
    GridColumn(columnName: 'designation', label: Text('Designation')),
    GridColumn(columnName: 'salary', label: Text('Salary'))
  ], stackedHeaderRows: [
    StackedHeaderRow(cells: [
        columnNames: ['id', 'name', 'designation', 'salary'],
        child: Center(
          child: Text('Order Details'),


final List<StackedHeaderRow> stackedHeaderRows;