Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBGrid live update?

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
Hello all,
I have a DBGrid that is tied to a DataSet that's source is a qry. When a user double clicks on a record, the record is updated (a statuscd change from 'NR' to 'RU'). The query returns all records that are 'NR'. I want to know if it's possible for the DBGrid/Dataset/Qry (any?all?) to be updated so that the person who's record was just changed no longer shows in the DBGrid. Possible?

Thanks!
Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
You want to refresh query over the network too? All I would do is put a TTimer in the interface which refreshed(close and reopen) the query on each client. Is this what you want ?

lou (I am trying - alot of people have told me that).
 
Maybe, I'll give it a try. I'd like for the record that got updated to not show up on the DBGrid after it's update - but it was just a stray thought, nothing major for functionality or anything.

Thanks!

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
Use a filter. Set Filtered property of your dataset to True and add OnFilterRecord handler for example:

procedure TfrDict.ADataSetFilterRecord(DataSet: TDataSet;
var Accept: Boolean);
begin
Accept := (DataSet.FieldByName('SomeField').asString = 'RU');
end;

--- markus
 
Markus you rock! I'll give this a try today (tweaking a different program now)!

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top