Subject Re: [IBO] Howto manually update control when detail dataset changes
Author Lucas Franzen
mirco@... schrieb:
>
> I need to display data of a detail dataset in a master-detail view in
> a special way, so I cannot bind any of the built-in controls to the
> dataset. (Actually data is to be displayed in a grid in a cross-tab
> form, but it doesn't really matter for this issue).

You can use the OnDataChange event of the DataSource of the MasterQuery,
like:

procedure OnDataChange ( ... )
begin
if Masterqry.Active AND ( NOT Assigned ( Field ) ) then
begin
with myDetailQry do
begin
if not Prepared then prepare;
ParamByName ( 'FK_ID' ).AsInteger := MasterQry.FieldByName ...
if not Active then Open;
end;
end;
end;


Luc.