I have a master-details situation (grids). The master grid gets loaded automatically (autoFetchData = true). In its dataArrived() handler, I select the first record of the grid (this.selectSingleRecord(0)). And via the selectionChanged() handler, I load the details grid if state = true (meaning the record is selected and not deselected, right?).
So far this worked quite well, but now I found out that after a record edit, the dataArrived() also fires (at least in my set up), so this selects the first (master) record (mostly not the one edited), and loads the details of that record. I worked around this problem by creating an editComplete() handler, selecting the edited record. But this leads to a double fetch on the details grid (first for the first selected master record (an indirect result of DataArrived()), second for the edited record (a direct result of selectionChanged()).
So I have these two questions:
1) Is this a good approach (using the right handlers)?
2) Is there another way of keeping the record that's being edited selected after a save? (by the way, I use auto saves)
So far this worked quite well, but now I found out that after a record edit, the dataArrived() also fires (at least in my set up), so this selects the first (master) record (mostly not the one edited), and loads the details of that record. I worked around this problem by creating an editComplete() handler, selecting the edited record. But this leads to a double fetch on the details grid (first for the first selected master record (an indirect result of DataArrived()), second for the edited record (a direct result of selectionChanged()).
So I have these two questions:
1) Is this a good approach (using the right handlers)?
2) Is there another way of keeping the record that's being edited selected after a save? (by the way, I use auto saves)
Comment