Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with grid refresh
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Problem with grid refresh
Divers
Thread ID:
00114894
Message ID:
00114894
Vues:
56
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform