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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to handle 2 users updating file viewed in grid

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
I need some way of updating the grid view where 2 different users may be viewing the same file in a grid so that changes made by user 1 to the file show up automatically in user 2 grid (even tho user 2 may be just viewing the grid). I guess question is how can I refresh user 2 grid if user 1 makes a change or deletes a record?
 
I found answer- I added a flag to the file and set it to .t. when being editted and chk if .t. before editing and don't allow if .t. Then when save, set to .f. - the second grid is automatically updated with any changes I made when user 2 clicks on grid to select record to edit!
 
Once user 1 has saved the updated information to disk the grid's Refresh method can be used to update the information in the cursor that is the RecordSource for user2's grid

pamela
 
Samsnead

I used a non-VFP that used a similar scheme. Watch out. If a user crashes in the middle of an edit, you will need some way to unlock it.

Or you may want to look into a timer control that refreshes the grid every few seconds to show any changes.

Jim Rumbaugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top