This topic is locked

on master record edit page, reload a detail record when js event on other detail record is clicked

3/5/2023 5:38:50 AM
PHPRunner Tips and Tricks
I
ibrahim author

Hi,
I have a master record edit page with two linked details tables, I use one of them as a list of options that when i click on a grid of it, it will create a record in the second detial table, its working fine to this step.
But is there a way to also reload the second detial table that had a new record incerted on? to be able to see the added record instantly,
I tried this code on the client after of grid click event (in the first deital table):
var detailsPage = pageObj.getDetailsPage( 'second_detials_table' );
detailsPage.reload( {} );
But it only work if the js event was in the master record , not another detial table connected to the same master record.
Any trick to auto reload the second detial table using the same event?

C
cristi 3/6/2023

You could try having master and details tables on a dashboard and use the excellent tutorial from fhumanes to do the job: https://asprunner.com/forums/topic/29627-Guide-48--Using-the-Dashboard-API-to-reload-panels-by-Ajax

I
ibrahim author 3/10/2023

I found the perfect solution in documentation https://xlinesoft.com/phprunner/docs/how_to_reload_a_page.htm
Example 2 on the guide page.
Thanks!