JavaScript Data Grid: Grid Callbacks
All of these grid callbacks are available through the GridOptions interface.
Accessories
| For customising the context menu. See Context Menu. | |
| For customising the main 'column header' menu. See Column Menu. | |
| Allows user to process popups after they are created. Applications can use this if they want to, for example, reposition the popup. |
Clipboard
See Clipboard for more information.
| Allows you to process cells for the clipboard. Handy if for example you have Date objects that need to have a particular format if importing into Excel. | |
| Allows you to process header values for the clipboard. | |
| Allows you to process group header values for the clipboard. | |
| Allows you to process cells from the clipboard. Handy if for example you have number fields, and want to block non-numbers from getting into the grid. | |
| 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. | |
| Allows complete control of the paste operation, including cancelling the operation (so nothing happens) or replacing the data with other data. |
Filtering
See Filtering for more information.
| Grid calls this method to know if an external filter is present. See External Filter. | |
| |
Integrated Charts
See Integrated Charts for more information.
| Callback to be used to customise the chart toolbar items. See Configuring Toolbar Items. | |
| Callback to enable displaying the chart in an alternative chart container. See Configuring Toolbar Items. |
Keyboard Navigation
See Keyboard Navigation for more information.
| Allows overriding the default behaviour for when user hits navigation (arrow) key when a header is focused. Return the next Header position to navigate to or null to stay on current header. | |
| Allows overriding the default behaviour for when user hits Tab key when a header is focused. | |
| Allows overriding the default behaviour for when user hits navigation (arrow) key when a cell is focused. Return the next Cell position to navigate to or null to stay on current cell. | |
| Allows overriding the default behaviour for when user hits Tab key when a cell is focused. | |
| Suppress the grid taking action for the relevant keyboard event when a cell is focused. See Suppress Keyboard Events. |
Localisation
See Localisation for more information.
| A callback for localising text within the grid. |
Miscellaneous
| 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) |
Pagination
See Row Pagination for more information.
Row Grouping and Pivoting
See Pivot and Aggregation for more information
| Callback for grouping. See Row Grouping. | |
| (Client-side Row Model only) Allows groups to be open by default. | |
| Allows default sorting of groups. See Default Group Order. | |
| Callback to be used with pivoting, to allow changing the second column definition. | |
| Callback to be used with pivoting, to allow changing the second column group definition. | |
| Callback to be used when working with Tree Data when treeData = true. See Tree Data. |
RowModel: Server-Side
See Server-Side Row Model for more information.
| Allows setting the child count for a group row. | |
| Allows providing different params for different levels of grouping. | |
| Allows groups to be open by default. | |
| Allows cancelling transactions. | |
| SSRM Tree Data: Allows specifying which rows are expandable. See SSRM Tree Data. | |
| SSRM Tree Data: Allows specifying group keys. See SSRM Tree Data. |
Rows
| Return a business key for the node. If implemented, 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 rows based on unique business keys. | |
| Allows you to set the ID for a particular row based on the data. | |
| Allows you to process rows after they are created, so you can do final adding of custom attributes etc. | |
| Callback to be used to determine which rows are selectable. By default rows are selectable, so return false to make a row un-selectable. See Specify Selectable Rows. | |
| Callback to be used with Master Detail to determine if a row should be a master row. If false is returned no detail row will exist for this row. | |
| Callback to fill values instead of simply copying values or increasing number values using linear progression. |
Sorting
See Row Sorting for more information.
| Callback to perform additional sorting after the grid has sorted the rows. See Post Sort. |
Styling
| Callback version of property rowClass to set class(es) for each row individually. Function should return either a string (class name), array of strings (array of class names) or undefined for no class. See Row Class. | |
| Callback version of property rowStyle to set style for each row individually. Function should return an object of CSS values or undefined for no styles. See Row Style. | |
| Callback version of property rowHeight to set height for each row individually. Function should return a positive number of pixels, or return null/undefined to use the default row height. See Row Height. | |
| Tells the grid if this row should be rendered as full width. See Full Width Rows. |