Expand All

  Getting Started

  Reference

  Features

  Row Models

  Themes new

  Components

  Examples

  Third Party

Misc

Github stars make projects look great. Please help, donate a star, it's free.
Read about ag-Grid's Partnership with webpack.
Get informed on releases and other ag-Grid news only - never spam.
Follow on Twitter

Grid Callbacks

All Callbacks
isExternalFilterPresent() Grid calls this method to know if external filter is present.
doesExternalFilterPass(node) Return true if external filter passes, otherwise false.
getRowClass(params) Callback version of property 'rowClass'. Function should return a string or an array of strings.
getRowStyle(params) Callback version of property 'rowStyle'. Function should return an object of CSS values.
getRowHeight(params) Callback version of property 'rowHeight'. Function should return a positive number.
headerCellRenderer(params) Provide a function for custom header rendering.
groupRowAggNodes(nodes) Callback for grouping. See the section on row grouping for detailed explanation.
getBusinessKeyForNode(node) Return a business key for the node. If implemented, then each row in the dom will have an attribute row-id='abc' where abc is what you return as the business key. This is useful for automated testing, as it provides a way for your tool to identify rules based on unique business keys.
getHeaderCellTemplate Function to use instead of headerCellTemplate, should return string or html DOM element.
getNodeChildDetails(callback) Allows you to pass tree structure data to the grid, or row data that is already grouped.
getChildCount(data) For Enterprise Row Model only. Allows setting the child count for a group row.
processRowPostCreate(params) Allows you to process rows after they are created. So you can do final adding of custom attributes etc.
getRowNodeId(data) Allows you to set the id for a particular row node based on the data. Useful for selection and server side sorting and filtering for paging and virtual pagination.
isFullWidthCell(rowNode) Tells the grid if this row should be rendered using fullWidth.
isRowMaster(dataItem) Callback to be used with Master Detail to determine if a row should be master row. If false is returned no detail row will exist for this row.
doesDataFlower(dataItem) Tells the grid if this row should flower.
navigateToNextCell(params) Allows overriding the default behaviour for when user hits navigation (arrow) key.
tabToNextCell(params) Allows overriding the default behaviour for when user hits tab key.
getDocument() Allows overriding what document is used. Currently used by Drag and Drop (may extend to other places in the future). Use this when you want the grid to use a different document than the one available on the global scope. This can happen if docking out components (something which Electron supports).
getContextMenuItems(params) For customising the context menu.
getMainMenuItems(params) For customising the main 'column header' menu.
processCellForClipboard(params) Allows you to process cells for the clipboard. Handy if you have date objects that you need to have a particular format if importing into Excel.
processCellFromClipboard(params) Allows you to process cells from the clipboard. Handy if you have for example number fields, and want to block non-numbers from getting into the grid.
sendToClipboard(params) Allows you to get the data that would otherwise go to the clipboard. To be used when you want to control the 'copy to clipboard' operation yourself.
processSecondaryColDef(colDef) Callback to be used with pivoting, to allow changing the second column definition.
processSecondaryColGroupDef(colGroupDef) Callback to be used with pivoting, to allow changing the second column group definition.
postProcessPopup(params) Allows user to process popups after they are created. Applications can use this if they want to, for example, reposition the popup.
paginationNumberFormatter(params) Allows user to format the numbers in the pagination panel, ie 'row count' and 'page number' labels. This is for pagination panel only, to format numbers inside the grid's cells (ie your data), then use valueFormatter in the column definitions.