Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with grid refresh
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Problem with grid refresh
Miscellaneous
Thread ID:
00114894
Message ID:
00114894
Views:
57
Up front info:

1. Parent - Child form.
2. Both parent and child data sources are indexed views with optimistic table buffering

The child data is in a grid. Just below the grid I have 2 command buttons for adding and removing child records. The remove button has the following code:
SELECT RetrofitDetailView                   && Ensure correct alias selected

IF !EOF()
	?? CHR(7)
	mndelete=MESSAGEBOX("   Do you wish to remove   "+CHR(13)+;
		"this item from the retrofit?",4+32+0,"Remove Item?")
	IF mndelete=6
		DELETE
	ENDIF
	ThisForm.LockScreen=.T.
	This.Parent.grdRetroDetail.Refresh
	This.Parent.grdRetroDetail.Column1.SetFocus
	ThisForm.LockScreen=.F.
ENDIF
The code works fine in that the record is deleted but the grid doesn't refresh. If I take focus away from the form, say by clicking in the command window, and then click back on the form the grid refreshes and the deleted record is no longer seen. Any ideas on why this is happening and how to correct? TIA
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Next
Reply
Map
View

Click here to load this message in the networking platform