It would be great if we can give a custom message like _"No records found"_ or maybe even show an image to user if the grid has zero rows because there is no underlying data.
Anybody find an implementation or workaround for this?
Ideally you would be able to include a template for no results. thoughts @ceolter ?
Yup I agree, I will get this in soon. Something easy to unblock this. Then in the future, a template.
+1
+1
+1
today's release has this. there is an overlay that can be overridden with your own template for 'no rows'. works in same way as template for 'loading'. explained in the docs.
You can use overlayNoRowsTemplate
;)
is there any option to display no data found when you not found anything in filter...?
this.gridOptions =
localeText: { noRowsToShow: 'Put your message here ' },
}
Overlay overlayNoRowsTemplate can be used
Example:
const overlayNoRowsTemplate= "No record found";
<AgGridReact
onGridReady={this.onGridReady}
columnDefs={this.state.columnDefs}
defaultColDef={this.state.defaultColDef}
rowData={data}
pagination={true}
reactNext={true}
animateRows
onCellClicked={this.showEvent.bind(this)}
paginationPageSize={this.state.paginationPageSize}
paginationNumberFormatter={this.state.paginationNumberFormatter}
overlayNoRowsTemplate={overlayNoRowsTemplate}
/>
Most helpful comment
is there any option to display no data found when you not found anything in filter...?