Solved

DBGrid not refreshing ...

Posted on 2000-04-21
4
379 Views
Last Modified: 2011-04-14
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.
0
Comment
Question by:Diono
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ITugay
ID: 2739550
It seems you have NT? Try it under W95 or W98. Is it different?
;)
-----
Igor
0
 

Expert Comment

by:chumba
ID: 2739862
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.
0
 
LVL 1

Accepted Solution

by:
Arturo Hernandez earned 80 total points
ID: 2744285
after you active or run the query try doing

dbgrid1.refresh;

or

form1.update;
form1.refresh;
0
 
LVL 9

Expert Comment

by:ITugay
ID: 2746657
vainas,
If Diono has that problem regarding NT, then it doesn't help. Beleave me.
----
Igor.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now