Hello,
I got and app with three DBgrids and three DBTables. One of the tables is the "master" and the others are two "detail" tables. This is configured via the "masterdatasource" and "masterdatamapping" properties in both detail tables.
Also, to prevent unnecessary refreshing, I set the "mastergrids" property in both detail grids to the master grid and the other detail grid.
Master grid = DBGrid_1
Detail grids = DBGrid_2 & DBGrid_3
DBGrid_2.mastergrids = "dbgrid_1,dbgrid_3"
DBGrid_3.mastergrids = "dbgrid_1,dbgrid_2"
Theoretically, if I click on detail grid 2, there will be no refreshing of either the master or the detail grid 3.
And conversely, if I click on detail grid 3, there will be no refreshing of master grid nor detail grid 2.
But, when looking at the SQL TAB in the IDE, I can see that only the refresh of the master grid is prevented, and the other detail table SQL is executed. For instance, if I click on grid 2, I can see that the SQL for grid 3 executes (but not the grid 1 sql, the master one).
All grids are set to:
clicktoselect = false
onpagechangedorefresh = false
onrowselectdorefresh = false
Both detail grids autorefresh are set to false, master set to true.
Maybe a bug or something can be incorrect in my settings?
Regards,
"Maybe a bug or something can be incorrect in my settings?"
we will look into this.
Hi,
Tested under 3.5, two differents apps in two differente projects, still the same.
Additional info: the grids were created using the Wizard to create the master "Grid + popup form" and then appending two additional "Grid + popup form" to the app.
My settings:
All 3 tables autosync -> No, resultcache -> yes.
"Master" dbgrid_1
autorefresh - true
cardview - responsive
clicktoselect - false
data > datasidepagination - client
ignorecmd - true
mastergrids - empty
onpagechangedorefresh - false
onrowselectdorefresh - false
First detail: dbgrid_3
autorefresh - false
cardview - responsive
clicktoselect - false
data > datasidepagination - client
ignorecmd - true
mastergrids - dbgrid_1,dbgrid_4
onpagechangedorefresh - false
onrowselectdorefresh - false
Second detail: dbgrid_4
autorefresh - false
cardview - responsive
clicktoselect - false
data > datasidepagination - client
ignorecmd - true
mastergrids - dbgrid_1,dbgrid_3
onpagechangedorefresh - false
onrowselectdorefresh - false
SYMPTOMS
Clicking on any record in dbgrid_3 causes the SQL for dbgrid_4 to be executed and the grid is refreshed. And viceversa, clicking on a dbgrid_4 record causes dbgrid_3 to refresh. In both cases dbgrid_1 is NOT refreshed, which is correct.
We'll try to replicate. We could not replicate the first report, as shown in a video. But we'll try again.
I didn't know you could suppress the refresh. That is nice. The shown data is correct, but on details, it is not necessary to refresh the master. Not sure if it is helpful, but it looks like it is working in development, but not on deployed version. Caching issue?
We created a similar application, and made a multiple master-detail. You can see the result in the samples above:
https://www.phspeed.com/apps/phsp35/testcases/masterdubbledetail.php
If you click on the master, then everything gets updated. If you click elsewhere, nothing gets updated. I'm not exactly sure if we have emulated your situation. But this application works as designed. The master grid property prevents parts of the form being updated, it does nothing to the datasets.