buildPreHeaderRows(parentElement)
JavaScript API Reference/Ab.grid.ReportGrid object
buildPreHeaderRows(parentElement)
Add a custom header row (or rows) above the column title headers. This function is called each time the ReportGrid is refreshed and can therefore be used to display summary or time information that is recalculated each time the data is reloaded. The parentElement is used to append the constructed header row(s) as its child(ren),
Parameters:
-
parentElement
(DOM reference): the DOM element to which the footer rows are appended, typically the ReportGrid’stableHeadElement
Example:
Override the standard (empty) preHeader build function to add some desired content:
grid.buildPreHeaderRows
= function(parentElement) {
var rowElement = document.createElement('tr');
// construct custom row
...
parentElement.appendChild(rowElement);
}