Board index » delphi » Update grid

Update grid

Hello

Could someone tell me the best way to keep two grids (or TTables) up to
date.

Problem:

Two forms, Two grids, Two TTables, One Physical Table.
When I make a change in one grid the change does not show up in the second
grid.

TIA

Eric

 

Re:Update grid


In the AfterPost event handler of each TTable call the other TTable's
Refresh method.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Update grid


Quote
Bill Todd (TeamB) wrote in message <6l4nb0$os...@forums.borland.com>...
>In the AfterPost event handler of each TTable call the other TTable's
>Refresh method.

>--
>Bill

>(TeamB cannot answer questions received via email.)
>(To contact me for any other reason remove nospam from my address)

Thanks Bill.

Eric

Re:Update grid


Quote
new_u...@email.msn.com wrote in message <6l6b08$q...@forums.borland.com>...
>Bill Todd (TeamB) wrote in message <6l4nb0$os...@forums.borland.com>...
>>In the AfterPost event handler of each TTable call the other TTable's
>>Refresh method.

>>--
>>Bill

>>(TeamB cannot answer questions received via email.)
>>(To contact me for any other reason remove nospam from my address)

Hello Bill

I just tryed your suggestion and it works fine when records are added.
However, when I delete a record that change is not reflected. Do I have to
put the same code in the AfterDelete method?

TIA

Eric

Re:Update grid


Bill I am having a similar problem.  I am using cached updates.  In order to
update the queries right now, I have to close the files and reopen them.
Using foxpro tables and I have localshare turned on

Quote
Bill Todd (TeamB) wrote in message <6l4nb0$os...@forums.borland.com>...
>In the AfterPost event handler of each TTable call the other TTable's
>Refresh method.

>--
>Bill

>(TeamB cannot answer questions received via email.)
>(To contact me for any other reason remove nospam from my address)

Re:Update grid


That is correct.  The only way to update a query is to re-run it.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Update grid


Yes.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Other Threads