PdfGridHeaderCollection class Null safety

Provides customization of the settings for the header.

//Create a new PDF document
PdfDocument document = PdfDocument();
//Create a PdfGrid
PdfGrid grid = PdfGrid();
//Add columns to grid
grid.columns.add(count: 3);
//Add headers to grid
grid.headers.add(2);
PdfGridHeaderCollection headers = grid.headers;
headers[0].cells[0].value = 'Employee ID';
headers[0].cells[1].value = 'Employee Name';
headers[0].cells[2].value = 'Salary';
//Add rows to grid
PdfGridRow row1 = grid.rows.add();
row1.cells[0].value = 'E01';
row1.cells[1].value = 'Clay';
row1.cells[2].value = '\$10,000';
PdfGridRow row2 = grid.rows.add();
row2.cells[0].value = 'E02';
row2.cells[1].value = 'Simon';
row2.cells[2].value = '\$12,000';
//Set the rows span
grid.rows.setSpan(0, 1, 2, 1);
//Draw the grid in PDF document page
grid.draw(
    page: document.pages.add(), bounds: Rect.zero);
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Constructors

PdfGridHeaderCollection(PdfGrid grid)
Initializes a new instance of the PdfGridHeaderCollection class with the parent grid.

Properties

count int
Gets the number of header in the PdfGrid.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

add(int count) List<PdfGridRow>
PdfGrid enables you to quickly and easily add rows to the header at run time.
applyStyle(PdfGridStyleBase style) → void
Enables you to set the appearance of the header row in a PdfGrid.
clear() → void
Removes all the header information in the PdfGrid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) PdfGridRow
Gets a PdfGridRow object that represents the header row in a PdfGridHeaderCollection control.