Working With Grid Panels
Working With Grid Panels
Grid panels are implemented by
Ab.grid.
ReportGrid
(for simple grids with sorting) or
Ab.grid.MiniConsole
(for grids with the
Smart Search console) objects. The
MiniConsole
object is an extension of the
ReportGrid
object, so you can use all methods of the
ReportGrid
with all grid panels.
Report grid properties and methods:
Property/Method | Description | Parameters |
---|---|---|
gridRows |
Ext.util.MixedCollection
of
Ab.grid.Row
objects, one for each grid row.
|
|
clear() | Clears the grid data rows. | |
refresh(restriction) |
Refreshes the panel data content from the server. If the
restriction
parameter is specified, the data content will be restricted.
|
restriction
:
parsed restriction of type
Ab.view.Restriction
;
|
getSelectedRecords() |
Returns
Ab.data.Record
objects for all selected rows.
|
|
selectAll(selected) | Selects all rows. |
selected
:
true
to select,
false
to unselect (optional, defaults to
true
)
|
unselectAll() | Unselects all rows. | |
enableSelectAll(enabled) |
Enable/disable the Select All checkbox. Used in the
afterInitialDataFetch
event handler.
|
enabled
:
true
to enable,
false
to disable
|
The report can display additional data by overriding one or more of the standard report JS methods that build the report HTML DOM content from the data returned by the workflow rule:
-
buildPreHeaderRows()
: creates the report header; -
createDataRows()
: creates report data rows; can change the content or style for any or all of report cells; -
createCellContent()
: customize the content of a cell -
buildPreFooterRows()
: creates the report footer.
Overriding the methods that build the report HTML DOM content requires close knowledge of the report HTML DOM structure.