Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting grid to refresh properly after deleting a row
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00133333
Message ID:
00133484
Vues:
7
Are you issuing a nodefault when trapping the delete key? I went back to my test form, and removed the nodefault I had put in the keypress event of grid1.column1.text1 and I'm now observing the same behavior. This code in the text1.keypress worked fine for me under VFP 6.0:
*Grid1.Column1.Keypress event
LPARAMETERS nKeyCode, nShiftAltCtrl
wait window str(nKeyCode) nowait
do case
	case nkeycode = 7
		delete
		nodefault
	case nkeycode = 22
		append blank
		nodefault
endcase
thisform.grid1.refresh
>Ken,
>
>I appreciate you sticking with me on this and I think I figured it out.
>
>My problem is that I want to do the deletion from within the grid by trapping the delete key in one column of the grid. If the deletion is WITHIN the grid & you are deleting the LAST row VFP6 rewrites ONLY the active remaining rows - not even a grid.refresh helps. I suppose they are saving a few clock cycles or something.
>
>The workaround is to setfocus to a control outside the grid the set it back to the grid AFTER the final row has been deleted.
>
>Once again thanks for your help.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform