Angular Data Grid: Grid Properties
All of these grid properties are available through the GridOptions interface.
Accessories
| Specifies the status bar components to use in the status bar. See Status Bar. | |
| Specifies the side bar components. See Side Bar. | |
| Set to true to not show the context menu. Use if you don't want to use the default 'right click' context menu. See Context Menu.Default: false | |
| When using suppressContextMenu, you can use the onCellContextMenu function to provide your own code to handle cell contextmenu events. This flag is useful to prevent the browser from showing its default context menu.Default: false | |
| Allows context menu to show, even when Ctrl key is held down. Default: false | |
| Set to true to always show the column menu button, rather than only showing when the mouse is over the column header. See Column Menu.Default: false | |
| DOM element to use as the popup parent for grid popups (context menu, column menu etc). See Popup Parent. |
Clipboard
See Clipboard for more information.
Column Definitions
See Column / Column Group definitions for more information
| Array of Column / Column Group definitions. | |
| A default column definition. Items defined in the actual column definitions get precedence. See Default Column Definition. | |
| A default column group definition. All column group definitions will use these properties. Items defined in the actual column group definition get precedence. See Default Column Group Definition. | |
| An object map of custom column types which contain groups of properties that column definitions can inherit by referencing in their type property. See Custom Column Types. | |
| Keeps the order of Columns maintained after new Column Definitions are updated. See Maintain Column Order. Default: false | |
| If true, then dots in field names (e.g. address.firstline) are not treated as deep references. Allows you to use dots in your field name if you prefer.Default: false |
Column Headers
See Column Headers for more information.
Column Moving
See Column Moving for more information.
| Allow reordering and pinning columns by dragging columns from the Columns Tool Panel to the grid. See Columns Tool Panel. Default: false | |
| Set to true to suppress column moving, i.e. to make the columns fixed position.Default: false | |
| If true, the ag-column-moving class is not added to the grid while columns are moving. In the default themes, this results in no animation when moving columns.Default: false | |
| If true, when you drag a column out of the grid (e.g. to the group zone) the column is not hidden.Default: false |
Column Sizing
See Column Sizing for more information.
| Set to 'shift' to have shift-resize as the default resize operation (same as user holding down Shift while resizing).Options: 'shift' | |
| Suppresses auto-sizing columns for columns. In other words, double clicking a column's header's edge will not auto-size. See Auto-sizing Columns. Default: false | |
| Number of pixels to add to a column width after the auto-sizing calculation. Set this if you want to add extra room to accommodate (for example) sort icons, or some other dynamic nature of the header. See Auto-sizing Columns. Default: 4 | |
| Set this to true to skip the headerName when autoSize is called by default. See Resizing Example.Default: false |
Components
See Components for more information.
| A map of component names to components. |
Editing
See Cell Editing for more information.
| Set to 'fullRow' to enable Full Row Editing. Otherwise leave blank to edit one cell at a time. See Full Row Editing.Options: 'fullRow' | |
| Set to true to enable Single Click Editing for cells, to start editing with a single click. See Single Click Editing.Default: false | |
| Set to true so that neither single nor double click starts editing. See Single Click, Double Click, No Click Editing.Default: false | |
| Set this to true to stop cell editing when grid loses focus. The default is that the grid stays editing until focus goes onto another cell. For inline (non-popup) editors only. See Stop cell editing.Default: false | |
| Set to true along with enterMovesDownAfterEdit to have Excel-style behaviour for the Enter key, i.e. pressing the Enter key will move down to the cell beneath as described here.Default: false | |
| Set to true along with enterMovesDown to have Excel-style behaviour for the Enter key, i.e. pressing the Enter key will move down to the cell beneath as described here.Default: false | |
| Set to true to enable Undo / Redo while editing. See Undo / Redo Edits. | |
| Set the size of the undo / redo stack. Default: 10 | |
| Set to true so stop the grid updating data after and edit. When this is set, it is intended the application will update the data, eg in an external immutable store, and then pass the new dataset to the grid. See Read Only Edit. |
Export
See Export for more information.
| A default configuration object used to export to CSV. See CSV Export. | |
| Prevents the user from exporting the grid to CSV. Default: false | |
| A default configuration object used to export to Excel. See Excel Export. | |
| Prevents the user from exporting the grid to Excel. Default: false | |
| A list (array) of Excel styles to be used when exporting to Excel with styles. See Excel Export Styles. |
Filtering
See Filtering for more information.
| Rows are filtered using this text as a quick filter. See Quick Filter. | |
| Set to true to turn on the quick filter cache, used to improve performance when using the quick filter. See Quick Filter Cache.Default: false | |
| Set to true to override the default tree data filtering behaviour to instead exclude child nodes from filter results. See Tree Data Filtering.Default: false |
Integrated Charts
See Integrated Charts for more information.
| ||
| The list of chart themes to be used. See Provided Themes. Default: ['ag-default', 'ag-material', 'ag-pastel', 'ag-vivid', 'ag-solar'] | |
| A map containing custom chart themes. See Custom Chart Themes. | |
| Chart theme overrides applied to all themes. See Overriding Existing Themes. |
Loading Cell Renderers
See loadingCellRenderer for more information.
| Provide your own loading cell renderer to use when data is loading via a DataSource. See Loading Cell Renderer. | |
| Params to be passed to the loadingCellRenderer component. | |
| Callback to select which loading cell renderer to be used when data is loading via a DataSource. See Loading Cell Renderer Selector. |
Localisation
See Localisation for more information.
Master Detail
See Master Detail for more information.
| Set to true to enable Master Detail.Default: false | |
| Provide a custom detailCellRenderer to use when a master row is expanded. See Custom Detail. | |
| Specifies the params to be used by the Detail Cell Renderer. Can also be a function that provides the params to enable dynamic definitions of the params. See Detail Grids. | |
| Set fixed height in pixels for each detail row. See Fixed Height. | |
| Set to true to have the detail grid dynamically change it's height to fit it's rows. See Auto Height. | |
| Set to true to have the detail grid embedded in the master grid's container and so link their horizontal scrolling. See Syncing Detail Scrolling with Master. | |
| Set to true to keep detail rows for when they are displayed again.Default: false | |
| Sets the number of details rows to keep. Default: 10 |
Miscellaneous
| The Grid Api for interacting with the grid. Set by the grid on init, set to null on destroy. See Grid Api. | |
| The Column Api for interacting with the grid columns. Set by the grid on init, set to null on destroy. See Column Api. | |
| A list of grids to treat as Aligned Grids. If grids are aligned then the columns and horizontal scrolling will be kept in sync. See Aligned Grids. | |
| Provides a context object that is provided to different callbacks the grid uses. Used for passing additional information to the callbacks by your application. See Context. | |
| Change this value to set the tabIndex order of the Grid within your application. Default: 0 | |
| The number of rows rendered outside the viewable area the grid renders. Having a buffer means the grid will have rows ready to show as the user slowly scrolls vertically. Default: 10 | |
| ||
| Set to true to configure the value cache to not expire after data updates. See Value Cache.Default: false | |
| ||
| If true, row nodes do not have their parents set. The grid doesn't use the parent reference, but it is included to help the client code navigate the node tree if it wants by providing bi-direction navigation up and down the tree. If this is a problem (e.g. if you need to convert the tree to JSON, which does not allow cyclic dependencies) then set this to true.Default: false | |
| Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch). See Touch Support. Default: false | |
| Set to true to not set focus back on the grid after a refresh. This can avoid issues where you want to keep the focus on another part of the browser.Default: false | |
| Disables the asynchronous nature of the events introduced in v10, and makes them synchronous. This property only exists for the purpose of supporting legacy code which has a dependency on synchronous events from earlier versions (v9 or earlier) of AG Grid. It is strongly recommended that you do not change this property unless you have legacy issues. Default: false | |
| The grid will check for ResizeObserver and use it if it exists in the browser, otherwise it will use the grid's alternative implementation. Some users reported issues with Chrome's ResizeObserver. Use this property to always use the grid's alternative implementation should such problems exist.Default: false | |
| Disables showing a warning message in the console if using a gridOptions or colDef property that doesn't exist.Default: false | |
| Disables change detection. Default: false | |
| Set this to true to enable debug information from the grid and related components. Will result in additional logging being output, but very useful when investigating problems.Default: false |
Overlays
See Overlays for more information.
| Provide a template for 'loading' overlay. | |
| Provide a custom loading overlay component. See Loading Overlay Component. | |
| Customise the parameters provided to the loading overlay component. | |
| Disables the 'loading' overlay. Default: false | |
| Provide a template for 'no rows' overlay. | |
| Provide a custom no rows overlay component. See No Rows Overlay Component. | |
| Customise the parameters provided to the no rows overlay component. | |
| Disables the 'no rows' overlay. Default: false |
Pagination
See Row Pagination for more information.
| Set whether pagination is enabled. Default: false | |
| How many rows to load per page. If paginationAutoPageSize is specified, this property is ignored. See Customising Pagination.Default: 100 | |
| Set to true so that the number of rows to load per page is automatically adjusted by the grid so each page shows enough rows to just fill the area designated for the grid. If false, paginationPageSize is used. See Auto Page Size.Default: false | |
| Set to true to have pages split children of groups when using Row Grouping or detail rows with Master Detail. See Pagination & Child Rows.Default: false | |
| If true, the default grid controls for navigation are hidden. This is useful if pagination=true and you want to provide your own pagination controls. Otherwise, when pagination=true the grid automatically shows the necessary controls at the bottom so that the user can navigate through the different pages. See Custom Pagination Controls.Default: false |
Pivot and Aggregation
See Pivot and Aggregation for more information
| Set to true to enable pivot mode.Default: false | |
| When to show the 'pivot panel' (where you drag rows to pivot) at the top. Note that the pivot panel will never show if pivotMode is off.Default: never Options: 'never', 'always', 'onlyWhenPivoting' | |
| When set and the grid is in pivot mode, automatically calculated totals will appear within the Pivot Column Groups, in the position specified. See Pivot Column Group Totals. Options: 'before', 'after' | |
| When set and the grid is in pivot mode, automatically calculated totals will appear for each value column in the position specified. See Pivot Row Totals. Options: 'before', 'after' | |
| If true, the grid will not swap in the grouping column when pivoting. Useful if pivoting using Server Side Row Model or Viewport Row Model and you want full control of all columns including the group column. | |
| When enabled, pivot column groups will appear 'fixed', without the ability to expand and collapse the column groups. See Fixed Pivot Column Groups. Default: false | |
| If true, then row group, pivot and value aggregation will be read-only from the GUI. The grid will display what values are used for each, but will not allow the user to change the selection. See Read Only Functions.Default: false | |
| A map of 'function name' to 'function' for custom aggregation functions. See Custom Aggregation Functions. | |
| When true, column headers won't include the aggFunc name, e.g. 'sum(Bank Balance)' will just be 'Bank Balance'.Default: false | |
| When true, the aggregations won't be computed for the root node of the grid. See Big Data Small Transactions.Default: false | |
| When using change detection, only the updated column will be re-aggregated. See Change Detection. Default: false | |
| Set to true so that aggregations are not impacted by filtering. See Custom Aggregation Functions.Default: false |
Rendering
| ||
| ||
| To be used in combination with enableCellChangeFlash, this configuration will set the delay in milliseconds of how long a cell should remain in its "flashed" state.Default: 500 | |
| To be used in combination with enableCellChangeFlash, this configuration will set the delay in milliseconds of how long the "flashed" state animation takes to fade away after the timer set by cellFlashDelay has completed.Default: 1000 | |
| Set to true to have cells flash after data changes even when the change is due to filtering. See Flashing Data Changes.Default: false | |
| Options: 'normal', 'autoHeight', 'print' | |
| When true, the order of rows and columns in the DOM are consistent with what is on screen. See Accessibility - Row and Column Order.Default: false | |
| Set to true to operate the grid in RTL (Right to Left) mode. See RTL (Right to Left).Default: false | |
| Set to true so that the grid doesn't virtualise the columns. For example, if you have 100 columns, but only 10 visible due to scrolling, all 100 will always be rendered.Default: false | |
| Set to true so that the grid doesn't virtualise the rows. For example, if you have 100 rows, but only 10 visible due to scrolling, all 100 will always be rendered. See Suppress Row Virtualisation.Default: false | |
| By default the grid has a limit of rendering a maximum of 500 rows at once (remember the grid only renders rows you can see, so unless your display shows more than 500 rows without vertically scrolling this will never be an issue). This is only relevant if you are manually setting rowBuffer to a high value (rendering more rows than can be seen) or if your grid height is able to display more than 500 rows at once.Default: false |
Row Drag and Drop
See Row Dragging for more information.
| ||
| Set to true to enable clicking and dragging anywhere on the row without the need for a drag handle. See Entire Row Dragging.Default: false | |
| Set to true to enable dragging multiple rows at the same time. See Mulit-Row Dragging.Default: false | |
| Set to true to suppress row dragging.Default: false | |
| Set to true to suppress moving rows while dragging the rowDrag waffle. This option highlights the position where the row will be placed and it will only move the row on mouse up.Default: false |
Row Full Width
See Full Width Rows for more information.
| Provide your own cell renderer component to use for full width rows. See Full Width Cell Renderer. | |
| Customise the parameters provided to the fullWidthCellRenderer component. |
Row Grouping
See Row Grouping for more information.
| Specifies how the results of row grouping should be displayed. The options are: 'singleColumn': single group column automatically added by the grid. 'multipleColumns': a group column per row group is added automatically. 'groupRows': group rows are automatically added instead of group columns. 'custom': informs the grid that group columns will be provided. | |
| If grouping, set to the number of levels to expand by default, e.g. 0 for none, 1 for first level only, etc. Set to -1 to expand everything. See Opening Group Levels by Default.Default: 0 | |
| Allows specifying the group 'auto column' if you are not happy with the default. If grouping, this column definition is included as the first column in the grid. If not grouping, this column is not included. See Group Column Configuration. | |
| When true, preserves the current group order when sorting on non-group columns. See Maintain Group Order.Default: false | |
| When true, if you select a group, the children of the group will also be selected. See Group Selection.Default: false | |
| If grouping, this controls whether to show a group footer when the group is expanded. If true, then by default, the footer will contain aggregate data (if any) when shown and the header will be blank. When closed, the header will contain the aggregate data regardless of this setting (as the footer is hidden anyway). This is handy for 'total' rows, that are displayed below the data when the group is open, and alongside the group when it is closed. See Enabling Group Footers.Default: false | |
| Set to true to show a 'grand total' group footer across all groups. See Enabling Group Footers.Default: false | |
| If true, and showing footer, aggregate data will always be displayed at both the header and footer levels. This stops the possibly undesirable behaviour of the header details 'jumping' to the footer on expand.Default: false | |
| If using groupSelectsChildren, then only the children that pass the current filter will get selected. See Group Selection.Default: false | |
| Shows the open group in the group column for non-group rows. See Showing Open Groups. Default: false | |
| Set to true to collapse groups that only have one child. See Remove Single Children. | |
| Set to true to collapse lowest level groups that only have one child. See Remove Single Children.Default: false | |
| Set to true to hide parents that are open. When used with multiple columns for showing groups, it can give a more pleasing user experience. See Hide Open Parents.Default: false | |
| When to show the 'row group panel' (where you drag rows to group) at the top. See Enabling Row Group Panel. Default: never Options: 'never', 'always', 'onlyWhenGrouping' | |
| Provide the Cell Renderer to use when groupDisplayType = 'groupRows'. See Group Row Cell Renderer. | |
| Customise the parameters provided to the groupRowRenderer component. | |
| By default, dragging a column out of the grid, i.e. to the Row Group Panel, it will be hidden in the grid. This property prevents the column becoming hidden in the grid. See Keeping Columns Visible. Default: false | |
| By default, when a column is un-grouped, i.e. using the Row Group Panel, it is made visible in the grid. This property stops the column becoming visible again when un-grouping. See Keeping Columns Visible. Default: false | |
| Set to true to enable the Grid to work with Tree Data. You must also implement the getDataPath(data) callback. See Tree Data. |
Row Pinning
See Row Pinning for more information.
| Data to be displayed as pinned top rows in the grid. | |
| Data to be displayed as pinned bottom rows in the grid. |
RowModel
See Row Model for more information.
| Sets the row model type. Default: clientSide Options: 'clientSide', 'infinite', 'viewport', 'serverSide' |
RowModel: Client-Side
See Client-Side Row Model for more information.
| Set the data to be displayed as rows in the grid. | |
| How many milliseconds to wait before executing a batch of async transactions. See Async transactions. | |
| Prevents Transactions changing sort, filter, group or pivot state when transaction only contains updates. See Suppress Model Updates. Default: false |
RowModel: Infinite
See Infinite Row Model for more information.
| Provide the datasource for infinite scrolling. See Datasource. | |
| How many extra blank rows to display to the user at the end of the dataset, which sets the vertical scroll and then allows the grid to request viewing more rows of data. Default: 1 | |
| How many requests to hit the server with concurrently. If the max is reached, requests are queued. Set to -1 for no maximum restriction on requests.Default: 2 | |
| How many rows for each block in the store, i.e. how many rows returned from the server at a time. Default: 100 | |
| How many blocks to keep in the store. Default is no limit, so every requested block is kept. Use this if you have memory concerns, and blocks that were least recently viewed will be purged when the limit is hit. The grid will additionally make sure it has all the blocks needed to display what is currently visible, in case this property is set to a low value. | |
| How many extra blank rows to display to the user at the end of the dataset, which sets the vertical scroll and then allows the grid to request viewing more rows of data. Default: 1 |
RowModel: Server-Side
See Server-Side Row Model for more information.
| | |
| Provide the serverSideDatasource for server side row model. See Registering the Datasource. | |
| (Partial Store only) How many rows for each block in the store, i.e. how many rows returned from the server at a time. Default: 100 | |
| (Partial Store only) How many blocks to keep in the store. Default is no limit, so every requested block is kept. Use this if you have memory concerns, and blocks that were least recently viewed will be purged when the limit is hit. The grid will additionally make sure it has all the blocks needed to display what is currently visible, in case this property is set to a low value. | |
| How many requests to hit the server with concurrently. If the max is reached, requests are queued. Set to -1 for no maximum restriction on requests.Default: 2 | |
| How many milliseconds to wait before loading a block. Useful when scrolling over many rows, spanning many Partial Store blocks, as it prevents blocks loading until scrolling has settled. | |
| When enabled, closing group rows will remove children of that row. Next time the row is opened, child rows will be read from the datasource again. This property only applies when there is Row Grouping. Default: false | |
| When enabled, always refreshes top level groups regardless of which column was sorted. This property only applies when there is Row Grouping. Default: false | |
| When enabled, always refreshes stores after filter has changed. Used by Full Store only, to allow Server-Side Filtering. Default: false |
RowModel: Viewport
See Viewport Row Model for more information.
| To use the viewport row model you need to provide the grid with a viewportDatasource. | |
| When using viewport row model, sets the page size for the viewport. | |
| When using viewport row model, sets the buffer size for the viewport. |
Scrolling
See Scrolling for more information.
| Set to true to always show the horizontal scrollbar.Default: false | |
| Set to true to always show the vertical scrollbar.Default: false | |
| Set to true to debounce the vertical scrollbar. Can provide smoother scrolling on slow machines. See Debounce Vertical Scroll.Default: false | |
| Set to true to never show the horizontal scroll. This is useful if the grid is aligned with another grid and will scroll when the other grid scrolls. (Should not be used in combination with alwaysShowHorizontalScroll.) See Aligned Grid as Footer.Default: false | |
| When true, the grid will not scroll to the top when new row data is provided. Use this if you don't want the default behaviour of scrolling to the top every time you load new data.Default: false | |
| When true, the grid will not allow mousewheel / touchpad scroll when popup elements are present.Default: false | |
| When true, the grid will not use animation frames when drawing rows while scrolling. Use this if the grid is working fast enough that you don't need animation frames and you don't want the grid to flicker.Default: false | |
| If true, middle clicks will result in click events for cells and rows. Otherwise the browser will use middle click to scroll the grid.Note: Not all browsers fire click events with the middle button. Most will fire only mousedown and mouseup events, which can be used to focus a cell, but will not work to call the onCellClicked function.Default: false | |
| If true, mouse wheel events will be passed to the browser. Useful if your grid has no vertical scrolls and you want the mouse to scroll the browser page.Default: false | |
| Tell the grid how wide in pixels the scrollbar is, which is used in grid width calculations. Set only if using non-standard browser-provided scrollbars, so the grid can use the non-standard size in its calculations. |
Selection
See Selection Overview for more information.
| Type of Row Selection. See Row Selection. Options: 'single', 'multiple' | |
| Set to true to allow multiple rows to be selected using single click. See Multi Select Single Click.Default: false | |
| If true, rows will not be deselected if you hold down Ctrl and click the row or press Space.Default: false | |
| If true, row selection won't happen when rows are clicked. Use when you only want checkbox selection.Default: false | |
| If true, cells won't be focusable. This means keyboard navigation will be disabled for grid cells, but remain enabled in other elements of the grid such as column headers, floating filters, tool panels.Default: false | |
| ||
| Set to true to be able to select the text within cells. Note: When this is set to true, the clipboard service is disabled.Default: false | |
| ||
| ||
| ||
| Set to 'x' to force the fill handle direction to horizontal, or set to 'y' to force the fill handle direction to vertical.Default: xy Options: 'x', 'y', 'xy' | |
| Set this to true to prevent cell values from being cleared when the Range Selection is reduced by the Fill Handle.Default: false |
Sorting
See Row Sorting for more information.
| Array defining the order in which sorting occurs (if sorting is enabled). Values can be 'asc', 'desc' or null. For example: sortingOrder: ['asc', 'desc']. See Example Sorting Order and Animation.Default: [null, 'asc', 'desc'] | |
| Set to true to specify that the sort should take accented characters into account. If this feature is turned on the sort will be slower. See Accented Sort.Default: false | |
| ||
| Set to true to suppress multi-sort when the user shift-clicks a column header.Default: false | |
| Set to 'ctrl' to have multi sorting work using the Ctrl (or Command ⌘ for Mac) key. See Multi Column Sorting.Options: 'ctrl' | |
| Set to true to suppress sorting of un-sorted data to match original row data. See Big Data Small Transactions.Default: false |
Styling
| Icons to use inside the grid instead of the grid's default icons. See Custom Icons. | |
| ||
| The style properties to apply to all rows. Set to an object of key (style names) and values (style values) See Row Style. | |
| CSS class(es) for all rows. Provide either a string (class name) or array of strings (array of class names). See Row Class. | |
| Rules which can be applied to include certain CSS classes. See Row Class Rules. | |
| Set to true to not highlight rows by adding the ag-row-hover CSS class.Default: false | |
| Uses CSS top instead of CSS transform for positioning rows. Useful if the transform function is causing issues such as used in row spanning.Default: false | |
| Set to true to highlight columns by adding the ag-column-hover CSS class.Default: false |
Tooltips
See Tooltip Component for more information.