Refresh button for whole page

How would I create a refresh button for one whole page?
Setting a 'Navigate to' at the same page does nothing.
I do not want to use location.reload() as it triggers the whole application to reload.

Invoking location.reload() refreshes the whole page which is what you need. Navigating to the same url won't do anything by design as the Angular router doesn't change the state if the url is the same. What exactly are you trying to achieve with the refresh?

I want to reload all my grids on the page, but just refreshing the whole page takes very long. Since I would like to put some reload button on more than one page I am searching for a generic way instead of triggering a reload for every grid by hand.

Maybe there is another way to do this? Like a refresh-button integrated into the datagrid component?
Like kendo does (bottom-right corner): https://demos.telerik.com/kendo-ui/grid/index
Such a solution would need some clicks more but would still our requirements to reload parts of the page in a generic way.

Can I trigger the Page load event again somehow?

If you want to reload all your DataGrids and you don't want to reload the whole page you have to call the load method of every DataGrid instance.

The PrimeNG DataGrid doesn't have a reload button built-in.

You cannot trigger the Page Load event but you can invoke the method that Radzen has generated for it. Use a Execute code action with Code set to this.load();

2 Likes