Board index » delphi » Updating Data controls in other forms

Updating Data controls in other forms

Hi,

I'd like to know if there's a general method of getting data controls to
be updated whenever there's a post in a table in a certain form.

I have some forms ,that are part of an MDI application, that
display the same or part of the same data (from the same table). I'd
like to have all data controls that might be on the screen (in different
forms) to update whenever there's a change in the TTable from any of
these forms.

Is there a "quick" way to do it ? or should I take care of it manually
(I thought of managing which TTable are open in each type of form and in
the TTable's AfterPost method scan all the currently open form and
update them as necessary).

Any help would be highly appreciated.

Thanks

Oran

 

Re:Updating Data controls in other forms


Quote
Oran Halberthal <o...@netvision.net.il> wrote:
>Hi,
>I'd like to know if there's a general method of getting data controls to
>be updated whenever there's a post in a table in a certain form.
>I have some forms ,that are part of an MDI application, that
>display the same or part of the same data (from the same table). I'd
>like to have all data controls that might be on the screen (in different
>forms) to update whenever there's a change in the TTable from any of
>these forms.
>Is there a "quick" way to do it ? or should I take care of it manually
>(I thought of managing which TTable are open in each type of form and in
>the TTable's AfterPost method scan all the currently open form and
>update them as necessary).
>Any help would be highly appreciated.
>Thanks
>Oran

I think it is enough to use DataModule.TTable.Refresh; Data controls,
being data-aware will pick up any changes.

Helps?

Other Threads