OnRowSelectDoRefresh / OnPageChangeDoRefresh

VictorUlloa, Fri Sep 02 2022, 01:01PM

Hi,
Can you please explain how does this grid events work?

Scenario: I have a simple grid with modal form, wizard generated.
I added a lookup (dbludropdown) to the form and MySQL logs shows that every time I check the link in the grid to open the modal form, the lookup is refreshed for the whole dataset (not only the records on screen but the complete dataset).

For example: the grid says "1 of 10 records, 14 total", and I select the link to edit ANY record, the MySQL log shows 14 distinct selects on the lookup field.

I'm looking for a way to prevent those selects, and to understand the behaviour of these events.

I know I can set a detail grid to not update the parent grid when selecting a row by setting the mastergrids property. Is there something like that for a grid/modal form pair?

Regards,
Re: OnRowSelectDoRefresh / OnPageChangeDoRefresh
administrator, Fri Sep 02 2022, 05:58PM

If you create a lookup, then it needs to apply the resultset based on the key. As PHsPeed caches results by default this would mean that you might not get the correct result set. That is why the caching is set to false on lookup datasets. But if the resultset can be reused and does not change, set the caching of the used lookup table to true.
Re: OnRowSelectDoRefresh / OnPageChangeDoRefresh
VictorUlloa, Fri Sep 02 2022, 07:36PM

Thank you very much, I'm re-reading the manual section on caching, it seems I need to better understand how it works...
Re: OnRowSelectDoRefresh / OnPageChangeDoRefresh
administrator, Fri Sep 02 2022, 07:58PM

If things are unclear, then let us know, and we'll try to enhance them. It is a 'living' document. PHsPeed is loaded with functionality, and it is challenging to document all and keep the stuff readable. Any feedback and help is appreciated.
Re: OnRowSelectDoRefresh / OnPageChangeDoRefresh
administrator, Fri Sep 02 2022, 08:03PM

Btw, we are also interested in features that our customers are missing so we can enhance the product further.