How to add placeholder in Ag Grid when no rows is returned?

2.2k views Asked by At

I tried using overlayNoRowsTemplate and noRowsOverlayComponent but it only shows these custom values before loading, but once loading is complete and no rows are present then it shows blank.

2

There are 2 answers

0
sandeep joshi On

well it should work by default. here is an example where i am getting noRowsOverlay even if data returned is null/undefined or just empty array [].

ref: https://www.ag-grid.com/javascript-grid-overlays/

If this doesnt help care to update the fiddle to reproduce the your issue?

0
Paritosh On

Once you get response from server and if that's empty, call gridApi.showNoRowsOverlay().