This topic is locked

How to Refresh List Page in the Dashboard

7/23/2020 2:47:31 PM
PHPRunner Tips and Tricks
Sergey Kornilov admin

[size="3"]Example 1: Reload a page from event that belongs to the same table[/size]
For instance, we are doing inline edit and want to reload this List page after saving the record, without reloading the whole dashboard.

if( !pageObj.myAfterInline ) {

this.on('afterInlineEdit', function( fieldsData ) {

pageObj.reload({a:'reload'});

} );

pageObj.myAfterInline = true;

}



[size="3"]Example 2: Reload a page that belongs to another table[/size]
For instance, on the dashboard page we have a button that adds a new customer and we want to reload Customers table after.

  1. Add the following code to Javascript OnLoad event of the Customers table.

window.customersPage = pageObj;


2. Add the following code to any Javascript event where you want to reload the Customers table. Can be ClientAfter event of any button.

if( window.customersPage ) {

window.customersPage.reload({a:'reload'});

}