Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00459533
Message ID:
00459757
Vues:
26
>>>>>>>>>>>
>i have a grid with about a 100 rows, i want to use the ENTER key to enable the user to move to the start of a new row when he reaches the last column.
>at present it come to the start of the same row. the row does not change.
>>>>>>>>>>>>
>In the last comlumn's textbox LostFocus event put:
>
>    thisform.grid1.AllowAddnew = .t.
>
>And in the gotfocus event of all other column (textbox) put:
>
>
>      thisform.grid1.AllowAddnew = .f.
>
>With this you need to use the down-arrow instead of the ENTER key but it works.

You can automate the records adding with this code in last column textbox.KeyPress():
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 13 && Enter
	APPEND BLANK IN (this.parent.parent.RecordSource)
	keyboard '{DNARROW}'
	this.parent.parent.column1.SetFocus()
ENDIF
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform