Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid not refreshing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00348754
Message ID:
00348769
Vues:
26
Hi Alex.

>> The grid is based on this view and the purpose is to allow the users to go through the list of Drs. specialties and edit them (i.e. change Stomachology to Gastrology, etc.).

The problem I'm having is that when a change like the above occurrs, the grid's order doesn't get refreshed. <<

After making sure that you have creating an index tag on the relevant field in your view, try this in the LostFocus of the texbox:
LOCAL lnrecno
*** If the grid's RecordSource has an index tag on this field
*** We want make sure that as soon as we change its contents,
*** The grid displays everything in the correct order
*** First Check to see if we have changed this field
IF INLIST( GETFLDSTATE( JUSTEXT( This.ControlSource ), This.Parent.Parent.RecordSource ), 2, 4 )
	Thisform.LockScreen = .T.
	WITH This.Parent.Parent
		lnRecno = RECNO( .RecordSource )
	    *** Scroll Up one Page
		GO TOP IN ( .RecordSource )
	    .DoScroll(2)
	    *** Scroll back down one page
    		GO BOTTOM IN ( .RecordSource )
	    .DoScroll(3)
		*** Finally, go back to the original record 
		GO lnRecno IN ( .RecordSource )
	ENDWITH
	Thisform.LockScreen = .F.
ENDIF	
Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform