JavaScript API Reference/Ab.grid.ReportGrid object

buildPreFooterRows(parentElement)

Add a custom footer row (or rows) below the data rows and above the possible ‘Not all records can be shown’ message. 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 row(s) as its child(ren),

Parameters:

  • parentElement (DOM reference): the DOM element to which the footer rows are appended, typically the ReportGrid’s tableFootElement


Example:

Override the standard (empty) preFooter build function to add some desired content:

grid.buildPreFooterRows = function(parentElement) {
var rowElement = document.createElement('tr');
// construct custom row
...
parentElement.appendChild(rowElement);
}