Registry / web-framework / dash-ag-grid

dash-ag-grid

JSON →
library35.3.0pypypi✓ verified 24d ago

Dash AG Grid, currently at version 35.2.0, is a high-performance and highly customizable Dash component that wraps the AG Grid JavaScript library. It enables Python developers to create rich, interactive data tables within their Dash applications, offering features like sorting, filtering, and row selection. Actively maintained by Plotly, it receives frequent updates that often align with new releases of the underlying AG Grid component.

pip install dash-ag-grid
INSTALL
IMPORT
SIG · DASH-AG-GRID
D
dash-ag-grid
web-frameworkpythonv35.3.0
Install
8.2s avg
Import
1099ms
Disk
167MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v35.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.136s · 163.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.2s · import 1.062s · 163MB
167MB installed
● package 167MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DashAgGrid
import dash_ag_grid as dag
from dash_ag_grid import AgGrid
The convention is to import as 'dag' to reference the main component, 'AgGrid', as 'dag.AgGrid'.

This quickstart creates a basic Dash app displaying a Pandas DataFrame in an interactive AG Grid, demonstrating the minimal setup for displaying tabular data.

import dash_ag_grid as dag import pandas as pd from dash import Dash, html app = Dash(__name__) df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/ag-grid/space-mission-data.csv") app.layout = html.Div( [ dag.AgGrid( rowData=df.to_dict("records"), columnDefs=[{"field": i} for i in df.columns], ) ] ) if __name__ == "__main__": app.run_server(debug=True)
Debug
Known issues
breakingTheming API changed significantly in `v33+`. Previously, themes were applied via the `className` prop (e.g., `className="ag-theme-alpine"`). From `v33` onwards, themes are configured through a new `theme` API, often set via the `dashGridOptions` property. Applications upgrading from `v32` or earlier will need to update their theme implementation.
fix
For versions `v33+`, use the new theme API. For example, pass `dashGridOptions={'theme': 'alpine'}` or custom CSS variables instead of `className` for theming. Refer to the official Dash AG Grid documentation on theming.
affects: <33.0.0
gotchaDynamic updates to `columnDefs` (column definitions) can conflict with the grid's internal `columnState` (e.g., user-sorted columns, resized columns). This can lead to unexpected reordering or state loss.
fix
When dynamically updating `columnDefs`, consider using the `resetColumnState()` method or carefully managing `columnState` as an input/output in callbacks. Prefer `flex` over `sizeToFit` for column sizing to reduce conflicts.
affects: All versions
gotchaImplementing custom cell renderers, cell editors, or advanced custom filters often requires writing JavaScript functions or components. These must be defined in `.js` files within your Dash app's `assets/` directory and exposed in specific global JavaScript namespaces (e.g., `window.dashAgGridComponentFunctions`, `window.dashAgGridFunctions`).
fix
Be prepared to write and manage JavaScript for complex custom grid behaviors. Place JavaScript files in the `assets/` folder and ensure functions/components are registered in the correct `window.dashAgGrid*Functions` namespaces. Consult the 'JavaScript and Dash AG Grid' section of the official documentation.
affects: All versions
breakingFor security reasons, rendering raw HTML with the Markdown component or executing string expressions in grid properties (e.g., `valueFormatter` or `cellRenderer` when passed as strings) requires explicitly setting `dangerously_allow_code=True`. Without it, such content will be sanitized or ignored. In `v35.2.0`, `linkTarget` in Markdown also requires this prop for certain behaviors.
fix
If you need to render raw HTML or execute string-based JavaScript, set `dangerously_allow_code=True` on the `AgGrid` component. For custom components or trusted HTML, using Python functions for `cellRenderer` or defining custom JavaScript components is generally safer.
affects: >=2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dash_ag_grid'
The 'dash-ag-grid' package is not installed in the Python environment.
fix
Install the package using pip: 'pip install dash-ag-grid'.
TypeError: The `dash_ag_grid.AgGrid` component received an unexpected keyword argument: 'rowSelection'
The 'rowSelection' property is incorrectly passed directly to the 'AgGrid' component instead of within 'dashGridOptions'.
fix
Pass 'rowSelection' inside 'dashGridOptions': 'dag.AgGrid(dashGridOptions={'rowSelection': 'multi'}, ...)'
TypeError: The `dash_ag_grid.AgGrid` component received an unexpected keyword argument: 'sortable'
The 'sortable' property is incorrectly passed directly to the 'AgGrid' component instead of within 'defaultColDef' or 'columnDefs'.
fix
Pass 'sortable' inside 'defaultColDef' or 'columnDefs': 'dag.AgGrid(defaultColDef={'sortable': True}, ...)'
dash_ag_grid was not found
The 'dash_ag_grid' component is not properly registered or imported in the Dash application.
fix
Ensure 'dash_ag_grid' is installed and imported correctly: 'import dash_ag_grid as dag'.
ParserError: Syntax Error at line: 1, column 83
Incorrect import path for AG Grid CSS files after upgrading to a newer version.
fix
Update the import path to the correct location: 'import 'ag-grid-community/styles/ag-grid.css''.
Upgrade
Version history
35.3.0latest on PyPI · released Jul 15, 2026
Audit
Dependencies
dashrequiredCore framework for building web applications with Dash AG Grid.
pandasoptionalCommonly used for data handling and preparation before display in the grid.
Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
2
Bingbot
1
Resources
dash-ag-grid — pip install dash-ag-grid · libregistry