user2095956
user2095956

Reputation: 433

How to clear/remove all rows for ag-grid

I am trying to clear all current rows from my ag-grid. I tried to do this:

aggridOptions.api.setRowData([]);

but this adds me "No rows to show" dialog, then when I am updating the grid with new data the dialog is still appears.

Is there correct way to clear the grid from data rows?

Upvotes: 13

Views: 25121

Answers (1)

Sean Landsman
Sean Landsman

Reputation: 7179

I've taken a look and this is bug - we'll issue a fix for it in the next release. We'll be issuing a new release on Friday, which will include the fix for this - the next version will be ag-grid 6.3.0.

In the meantime, you can add the following line after addItems which should remove the overlay:

gridOptions.api.hideOverlay()

As I say though, from Friday this line won't be necessary

Upvotes: 10

Related Questions