Actually, I am still having a hard time. So I'll try to clarify as much as possible:
I am using a master-detail form. The master is a grid, and the detail are controls. The grid is databinded to a llblgen collection (A), as are the detail controls containing the data found in collection A. However, inside the detail there another grid, which data isn't found in that collection A. Instead it can be found in a different llblgen collection (B). Collection B has a one-2-many (A-2-B) relationship with A, so I COULD databind it (using the relationship), but that would result in an unwanted result, because the data of collection B isn't the datasource for the detail grid! The datasource of the detail grid is found inside an active directory. After the grid is filled with this data, I am able to select rows in the grid. The selected rows then need to be saved in collection B, using the current entity id of collection A as a FK in collection B (thus the relationship). Selected items should be added to collection A if they do not excist (if they already do, then it is already OK), whereas unselected items which excist in the collection A, should be deleted from it, thus only the selected items excist in collection B.
So, this isn't very hard:
Before row of collection A changes:
Loop all items of the detail grid. If selected and not excisting: add it to B. If not selected and excisting: delete it from B.
After looping: save to storage (the DB)
After row of collection A changes:
Loop all items of collection B and find the corresponding row in the detail grid, and select it.
But now I would like to add a cancel button Yikes!
Data can't be saved to the DB on "before row of collection A changes"; only save when the "save" button is pressed. This means, that I have to keep track of the collection B of collection A (see the relationship), and that is basically what I need and do not know
Sorry for the long post... I hope someone could provide me with a solution soon.
TIA,
BC