Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointer jumping in grid
Message
 
To
24/04/1997 17:58:45
Michael Lim
Shaw Industries, Inc.
Dalton, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00029625
Message ID:
00029647
Views:
25
>I am new to VisFox 3.0 and I have a question. I have a grid(child) that has orders and 4 txt boxes that display parent info(vendor) all on the same form. The grid displays 10 records(orders). If the user wants to edit a order in the grid, they click the record and then EDIT. The EDIT button disables all controls except SAVE and CANCEL. But, the EDIT button will sometimes move the record pointer to the top record in the grid away from the one the user clicked. If this happens the code in SAVE and CANCEL will check the wrong record. The user could change the record they wanted and I then get an error. I have tried storing the recno and then using GOTO to position the cursor but it does not always work.
>Any help would be appreciated.
>
>Michael Lim

Michael, you need to be very careful when working with Parent records and a Child grid on the same form. If the parent is refreshed, then it may re-set the Child record pointer to the first record in the relationship. You may need to check what table is SELECTed before issuing your Edit/Save/Cancel commands.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform