Expand All

  Getting Started



  Row Models




  Third Party


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


Callbacks are used by the grid for contacting your client application and asking it questions. It is not intended to inform your application of anything.


Add callbacks to the gridOptions or set as Angular properties.

List of 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.
isScrollLag() By default, scrolling lag is enabled for Safari and Internet Explorer (to solve scrolling performance issues in these browsers). To override when to use scroll lag either a) set suppressScrollLag to true to turn off scroll lag feature or b) return true of false from the function isScrollLag. This is a function, as it's expected your code will check the environment to decide whether to use scroll lag or not.
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.
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.
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.