Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting input to a grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00104141
Message ID:
00104147
Views:
28
Hi Matthew,

I did not quite understand your first problem but the solution to your second problem would be:

*-- Grid.Column.Control.KeyPress()
IF nKeyCode = KEY_ENTER && 13
loGrid = this.Parent.Parent
loGrid.ActivateCell(loGrid.RelativeRow + 1, loGrid.RelativeColumn)
NODEFAULT
ENDIF


>I have a form with a grid. The recordsource for the grid is a temporary cursor I have created in memory with several character type fields. The rows of the grid can be of different type (i.e. char, num, date).
>
>When a value(s) is keyed into a cell and the active cell changes, I would like to format the users input to match the row type. I added code to the AfterRowColChange Event to REPLACE the field value and this works great if I change columns, but it does not work on a row change since the record pointer to the table has moved. I tried placing similar code in the BeforeRowColChange Event, but it did not appear the field value was set until after this event. Does anyone have any ideas on the best way to achieve this?
>
>Also, how can I make the enter key move to the next row instead of the next column? Thanks in advance for any help,
>
>Mat Kennedy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform