I create a user task table using Dash AG Grid. The table data is fetched from TaskData API via requests
module.
When a TaskData API service is down, it will catch the error and return an empty dataframe, which will produce “No Rows to Show”.
Is it possible to customize/ replace “No Rows to Show” to “TaskAPI is not available now, please check again later”?
Hi @foongminwong
Try adding a custom overlay message like this:
dag.AgGrid(
dashGridOptions={
"overlayNoRowsTemplate": "<span style=\"padding: 10px; border: 2px solid #444; background: lightgoldenrodyellow; \">This is a custom 'no rows' overlay</span>"
},
dangerously_allow_code=True
),
Here’s a custom component example
https://dashaggrid.pythonanywhere.com/components/overlay
2 Likes