exportTableSummaryRows method

  1. @protected
void exportTableSummaryRows(
  1. SfDataGrid dataGrid,
  2. GridTableSummaryRowPosition position,
  3. PdfGrid pdfGrid
)

Export table summary rows to the Excel.

Implementation

@protected
void exportTableSummaryRows(SfDataGrid dataGrid,
    GridTableSummaryRowPosition position, PdfGrid pdfGrid) {
  if (dataGrid.tableSummaryRows.isEmpty) {
    return;
  }

  final List<GridTableSummaryRow> summaryRows = dataGrid.tableSummaryRows
      .where((GridTableSummaryRow row) => row.position == position)
      .toList();

  if (summaryRows.isEmpty) {
    return;
  }

  for (final GridTableSummaryRow summaryRow in summaryRows) {
    exportTableSummaryRow(dataGrid, summaryRow, pdfGrid);

    rowIndex++;
  }
}