Diono
asked on
DBGrid not refreshing ...
Hi guys,
I have found, what I believe to be a problem(bug), that a Lookup TField object(for a TQuery Object) does not refresh itself when declared as a field to be displayed in a DBGrid Component. When the dataset which the Lookup field uses for the lookup is changed, the underlying dataset is refreshed, but this is not reflected in the DBGrid even though I call a refresh to the dataset and DBGrid component. The Grid does refresh itself when you move the affected row off the visible canvas area. When you scroll it back into view, it has corrected itself. Any ideas?
I am using Delphi5 with the latest patch installed.
Regards,
Dion.
I have found, what I believe to be a problem(bug), that a Lookup TField object(for a TQuery Object) does not refresh itself when declared as a field to be displayed in a DBGrid Component. When the dataset which the Lookup field uses for the lookup is changed, the underlying dataset is refreshed, but this is not reflected in the DBGrid even though I call a refresh to the dataset and DBGrid component. The Grid does refresh itself when you move the affected row off the visible canvas area. When you scroll it back into view, it has corrected itself. Any ideas?
I am using Delphi5 with the latest patch installed.
Regards,
Dion.
Are you using ADO by chance? I found that the refresh method does not work when using ADO. I simply replaced refresh with a combination of ...
YourQueryHere.Active := FALSE;
YourQueryHere.Active := TRUE;
....basically the exact code which the refresh method is supposed to replace.
YourQueryHere.Active := FALSE;
YourQueryHere.Active := TRUE;
....basically the exact code which the refresh method is supposed to replace.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
vainas,
If Diono has that problem regarding NT, then it doesn't help. Beleave me.
----
Igor.
If Diono has that problem regarding NT, then it doesn't help. Beleave me.
----
Igor.
;)
-----
Igor