Board index » delphi » Refresh troubles in TDBGrids

Refresh troubles in TDBGrids

Hello all,

Who can help me refresh my memory and my TDBGrids ?
I have two problems:

1) A read-only TDBGrid displays names etc., with a double-click you can
   start editing the data for one person (another form). If I come back on the
   form with the grid I do not see updated data, even if I try
   DBGrid.Refresh or Table.Refresh.

2) Another read-only grid is linked to a query. If the user clicks soem
   radio buttons, I close the query, change it, open it, and the new
   selection appears in the grid. However, the scroll bar behaves very
   strange: the thumb stays in the middle of the vertical scroll bar
   far too long if I click in the scroll bar to go down.
   The query contains an ORDER BY phrase, and that order does not
   correspond with the primary key of the underlying Paradox table.
   Could this be the case, and what is the workaround?
   Again DBGrid.Refresh or Table.Refresh make no difference.

Tables/queries are simple, no lookups etc. (just a few calculated fields).
I'm talking Delphi 1 here, single user (but this has to be extended to a
multi-user app).

Thanks,
Jan

-----------------------------------------------------------------------
Jan Doggen                Masters Software           mass...@xs4all.nl
P.O. Box 697              2300 RA  Leiden            The Netherlands
-----------------------------------------------------------------------
** Specialists in multimedia software for education and presentation **
-----------------------------------------------------------------------
Usage of this email address for commercial purposes costs US$ 50 per
message. By using this email address you agree to this condition.
-----------------------------------------------------------------------

 

Re:Refresh troubles in TDBGrids


What database are you using?

1) If this grid is displaying the result set of a query you must rerun the
query to see the changes. If it is displaying the results of a table
TTable.Refresh should work.

2) This is normal when the grid cannot determine the number of rows returned
by the query.

Re:Refresh troubles in TDBGrids


Quote
>1) A read-only TDBGrid displays names etc., with a double-click you can
>   start editing the data for one person (another form). If I come back on the
>   form with the grid I do not see updated data, even if I try
>   DBGrid.Refresh or Table.Refresh.

My guess is you are not posting the record in the second form

Quote
>Tables/queries are simple, no lookups etc. (just a few calculated fields).
>I'm talking Delphi 1 here, single user (but this has to be extended to a
>multi-user app).

The grid component in Delphi 1 does not support a possitionable
scrollbar indicator.

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Other Threads