Columns and Column Groups |
| headerName |
The name to render in the column header. If not specified and field is specified, the field name would
be used as the header name. |
| columnGroupShow |
Whether to show the column when the group is open / closed. |
| headerClass |
Class to use for the header cell. Can be string, array of strings, or function. |
| toolPanelClass |
Class to use for the tool panel cell. Can be string, array of strings, or function. |
| suppressToolPanel |
Set to true if you do not want this column or group to appear in the tool panel. |
Columns Only |
| field |
The field of the row to get the cells data from |
| colId |
The unique ID to give the column. This is optional. If missing, the ID will default to the field.
If both field and colId are missing, a unique ID will be generated. This ID is used to identify
the column in the API for sorting, filtering etc. |
| type |
A comma separated string or array of strings containing ColumnType keys which can be used as a template for
a column. This helps to reduce duplication of properties when you have a lot of common column properties. |
| width, minWidth, maxWidth |
Initial width, min width and max width for the cell. Always stated in pixels (never percentage values). |
filter filterFramework |
Filter component to use for this column. Set to true to use the default filter. |
floatingFilterComponent floatingFilterComponentFramework |
Floating filter component to use for this column. |
| floatingFilterComponentParams |
Custom params to be passed to floatingFilterComponent or floatingFilterComponentFramework |
| hide |
Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field
'visible' and mark it false to hide, however we want all default values to be false and we want columns to be
visible by default. Note: this property is called hideCol when used with Aurelia. |
| pinned |
Set to 'left' or 'right' to pin. |
| lockPosition |
Set to true to always have column displayed first. |
| lockVisible |
Set to true block making column visible / hidden via the UI (API will still work). |
| lockPinned |
Set to true block pinning column via the UI (API will still work). |
| sortable |
Set to true to allow sorting on this column. |
| sort |
Set to 'asc' or 'desc' to sort by this column by default. |
| sortedAt |
If doing multi sort by default, this column should say when the sort for each column was done
in milliseconds, so the grid knows which order to execute the sort. |
| sortingOrder |
Array defining the order in which sorting occurs (if sorting is enabled). Values can be asc,
desc or null.
|
| resizable |
Set to true to allow column to be resized. |
| headerTooltip |
Tooltip for the column header |
| tooltipField |
The field of the tooltip to apply to the cell. |
| tooltip |
A callback that takes (value, valueFormatted, data, node , colDef, rowIndex and api) It must return the
string used as a tooltip. tooltipField takes precedence. |
| checkboxSelection |
Boolean or Function. Set to true (or return true from function) to render a selection checkbox in the column. |
| rowDrag |
Boolean or Function. Set to true (or return true from function) to render a row drag area in the column. |
| cellClass |
Class to use for the cell. Can be string, array of strings, or function. |
| cellStyle |
An object of css values. Or a function returning an object of css values. |
| editable |
Set to true if this col is editable, otherwise false. Can also be a function
to have different rows editable. |
| onCellValueChanged(params) |
Callback for after the value of a cell has changed, due to editing or the application calling api.setValue(). |
cellRenderer cellRendererFramework |
cellRenderer to use for this column. |
floatingCellRenderer floatingCellRendererFramework |
cellRenderer to use for pinned rows in this column. Floating cells will use floatingCellRenderer if available,
if not then cellRenderer. |
cellRendererSelector cellEditorSelector |
Callback to select which cell renderer / cell editor to be used for a given row within the same column. |
cellEditor cellEditorFramework |
cellEditor to use for this column. |
| valueGetter(params) |
Function or expression. Gets the value from your data for display.
|
| valueFormatter(params) |
Function or expression. Formats the value for display.
|
| headerValueGetter(params) |
Function or expression. Gets the value for display in the header.
|
| filterValueGetter(params) |
Function or expression. Gets the value for filtering purposes.
|
| floatingCellFormatter(params) |
Function or expression. Formatter to use for a pinned row. If missing, the normal valueFormatter will be used.
|
| valueSetter(params) |
Function or expression. Sets the value into your data for saving. Return true if the data changed.
|
| valueParser(params) |
Function or expression. Parses the value for saving.
|
| keyCreator(params) |
Function to return the key for a value - use this if the value is an object (not a primitive type) and you
want to a) use set filter on this field or b) group by this field. |
| getQuickFilterText |
A function to tell the grid what quick filter text to use for this column if you don't want
to use the default (which is calling toString on the value). |
| aggFunc |
Name of function to use for aggregation. One of [sum,min,max,first,last].
Or provide your own agg function. |
| allowedAggFuncs |
Aggregation functions allowed on this column eg ['sum','avg']. If missing, all installed functions are allowed.
This will restrict what the GUI allows to select only, does not impact when you set columns
function via the API.
|
| rowGroupIndex |
Set this in columns you want to group by. If only grouping by one column, set this to any number (eg 0).
If grouping by multiple columns, set this to where you want this column to be in the group (eg 0 for first, 1 for second, and so on). |
| pivotIndex |
Set this in columns you want to pivot by. If only pivoting by one column, set this to any number (eg 0).
If pivoting by multiple columns, set this to where you want this column to be in the order of pivots (eg 0 for first, 1 for second, and so on). |
| comparator(valueA, valueB, nodeA, nodeB, isInverted) |
Comparator function for custom sorting. |
| pivotComparator(valueA, valueB) |
Comparator to use when ordering the pivot columns, when this column is used to pivot on. The values will
always be strings, as the pivot service uses strings as keys for the pivot groups. |
| unSortIcon |
Set to true if you want the unsorted icon to be shown when no sort is applied to this column. |
| enableRowGroup |
(ag-Grid-Enterprise only) Set to true if you want to be able to row group by this column via the GUI.
This will not block if the API or properties are used to achieve row grouping. |
| enablePivot |
(ag-Grid-Enterprise only) Set to true if you want to be able to pivot by this column via the GUI.
This will not block if the API or properties are used to achieve pivot. |
| pivotTotals |
(ag-Grid-Enterprise only) Set to true if you want to introduce pivot total columns when in pivot mode. |
| enableValue |
(ag-Grid-Enterprise only) Set to true if you want to be able to aggregate by this column via the GUI.
This will not block if the API or properties are used to achieve aggregation. |
| enableCellChangeFlash |
Set to true to get grid to flash the cell when it's refreshed. |
| menuTabs |
Set to an array containing zero, one or many of the following options 'filterMenuTab', 'generalMenuTab'
and 'columnsMenuTab'. This is used to figure out which menu tabs and in which order the tabs are shown |
| suppressMenu |
Set to true if no menu should be shown for this column header. |
| suppressSizeToFit |
Set to true if you want this columns width to be fixed during 'size to fit' operation. |
| suppressMovable |
Set to true if you do not want this column to be movable via dragging. |
| suppressNavigable |
Set to true if this col is not navigable (ie cannot be tabbed into), otherwise false.
Can also be a function to have different rows navigable. |
| suppressCellFlash |
Set to true then this column will not flash changes. Only applicable if cell flashing is
turned on for the grid.
|
| suppressKeyboardEvent(params) |
Function to allow skipping default keyboard behaviour of the grid. Eg if you don't want the
grid to move focus up on up arrow key while editing, implement this method to return
true when params.editing=true and params.event.keyCode=[key code for up arrow key].
|
| onCellClicked(params) |
Function callback, gets called when a cell is clicked. |
| onCellDoubleClicked(params) |
Function callback, gets called when a cell is double clicked. |
| onCellContextMenu(params) |
Function callback, gets called when a cell is right clicked. |
| autoHeight |
Set to true to have the grid calculate height of row based on contents of this column. |
| singleClickEdit |
Set to true to have cells under this column enter edit mode after single click. |
Column Groups Only |
| groupId |
The unique ID to give the column. This is optional. If missing, a unique ID will be generated.
This ID is used to identify the column group in the column API. |
| children |
A list containing a mix of columns and column groups. |
| marryChildren |
Set to 'true' to keep columns in this group beside each other in the grid. Moving the columns outside
of the group (and hence breaking the group) is not allowed. |
| openByDefault |
Set to 'true' if this group should be opened by default. |
| headerGroupTooltip |
Tooltip for the column group header |