|Subject||Re: [IBO] How to synchronize 3 grids (N-M relation) ?|
> It's similar like an detail with 2 masters.There are a number of ways around this problem.
You could attach code to the OnDataChange handlers of the two master
datasources, or to the AfterScroll handlers of the two master
datasets. The best choice depends on what actions you need to detect
on the master - for example the creation of new records, or changes in
individual field values due to editing. OnDataChange reacts to all
data changes (both row changes and updates), whereas AfterScroll only
reacts to changes in row.
In either case simply update the detail parameter accordingly. (If you
are altering more than one parameter remember to use
Params.BeginUpdate / Params.EndUpdate in a try/finally block around
the parameter assignments).