Subject | Re: [IBO] Howto manually update control when detail dataset changes |
---|---|
Author | Lucas Franzen |
Post date | 2001-11-23T11:54:22Z |
mirco@... schrieb:
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.
>You can use the OnDataChange event of the DataSource of the MasterQuery,
> 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).
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.