Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal problem in grid
Message
From
24/08/1999 12:02:43
 
 
To
23/08/1999 17:56:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00256737
Message ID:
00257123
Views:
17
Try this:

Set Enabled = .F. on every column that you don't what the user to enter (Now there should only be one enabled column left). then put the following code in the textbox control the user can edit.

KeyPress Event:
LPARAMETERS nKeyCode, nShiftAltCtrl

if nKeyCode = 13 or nKeyCode = 9
This.Valid(nKeyCode)
endif

Valid Event:
LPARAMETERS nKeyCode

if nKeyCode = 13 or nKeyCode = 9
if recno('YourGridTable') < reccount('YourGridTable')
KEYBOARD '{DNARROW}'
endif
endif

This code should be enough, it works for me...

/Mårten Törnquist

>>Christian,
>>
>>Set the format and inputmask properties of the textboxes in the column. Also set the column's sparse property to .F.
>
>Jim,
>Yes, this was it. Now, something more difficult (I guess so): When I entered something in a field (in the grid) the focus goes automatically to the next column, even if Tab is .F. for this column. but I want to jump down to the next record, because the user is only allowed to enter one field (column) in the grid.
>Have a solution?
>Thanks to Jar Jar...
---( Mårten Törnquist )---
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform