Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid movement
Message
From
19/08/1999 12:24:01
 
 
To
19/08/1999 08:22:48
James Boden
Software Solutions For Business
Cumberland, Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00254642
Message ID:
00255364
Views:
27
Hi Jim.

>> When the user presses the add button it will append a blank into the database. I want them to stay just in that row and not be able to move up or down in the grid if there is other records. I want them to move to the left or right in the grid on that row and no other row. I hope that this is clear. <<

In that case, the way that I would handle it is to make sure that the grid's RecordSource is table buffered. Then I would add a custom property to the grid and save the recordSource's current record number to the property in the grid's BeforeRowColChange method. Then, in the AfterRowColChange, check to see if grid.nOldRecNo = RECNO(grid.RecordSource). If not, Save RECNO(grid.recordSource) to a local variable called lnRecNo. GO grid.nOldRecNo IN Grid.RecordSource) and check to see if all the record level validation passes. If not, issue a NODEFAULT, otherwise, go back to the record you were originally trying to navigate to (lnRecNo).

Does this make sense? If not, I will try to dig up some code that I use to accomplish this and get back to you with it. I just don't have it handy right.

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform