stackedHeaderRows property

List<StackedHeaderRow> stackedHeaderRows
final

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.

@override
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: [
      StackedHeaderCell(
        columnNames: ['id', 'name', 'designation', 'salary'],
        child: Center(
          child: Text('Order Details'),
        ),
      ),
    ])
  ]);
}

Implementation

final List<StackedHeaderRow> stackedHeaderRows;