Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Table Pointer Update
Message
From
15/10/1997 21:32:49
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
15/10/1997 21:23:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054620
Message ID:
00054808
Views:
36
>I'm developing a Point of Sales (POS) application. I start with a Form and place a grid which is bound to an alias called "Trans" where Trans is a transaction table. The grid has 6 columns: ItemNo, Desc, UOM, Qty, Sell_price and Total.
>
>I put the statement RETURN .F in the WHEN event of the following columns: Desc, UOM and Sell_price to prevent the user from entering those cells.
>
>When I start this POS application, the cursor will be setfocus to the first column of the grid that is ItemNo. I can type in the ItemNo or type '?' (question mark) to pop up the Item List so I can pick an Item from the list. After pressing Enter, the program will get the Sell_price value from another table called "STOCK" ( this is done in the Valid event of ItemNo textbox).
>
>Then the cursor will go to the Qty column because Desc, UOM are set to RETURN .F. in their WHEN events. In the Qty column I type in the Qty amount and press Enter. The program will calculate the Total column based on the Sell_price already retrieved from STOCK table multiplied by Qty entered. After calculating the Total the program will add a new blank row and the cursor will be in the ItemNo again.
>
>Then I enter the ItemNo for the second row and complete the second row. Now I'm in the ItemNo of the third row (new blank row). I do not type in the ItemNo for the third row, and I press Up arrow to move the cursor one row up to the second row (ItemNo of the third row is left empty). After I get to the ItemNo of the second row, then I press Enter to move the cursor to Qty column. Then I press Up Arrow to move up one row to the first row. Then I press Down Arrow again to move down to the second row. At this point the first row Total is recalculated again using the Sell_price of the second row because when I look at the table the record pointer of the Trans table is not moved as I move the cursor (change row from second to first row) in the Qty column. What should I do to link the movement of the table's record pointer with the movement in the grid ?
>
>Note: Everything works fine if I move the cursor in the first column (ItemNo) and press Enter to go to Qty column. Every time I want to change the Qty of another row when I'm in the Qty column I should go back to the first column and then move to another row and press Enter to go the Qty column that I want to change.
>
>Regards,
>Andi Hidajat
>e-mail: pkshq@cbn.net.id

I don't think the sequence of keystroke you execute is the prime cause.

Did you define your recordsource? Are you on buffering mode?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform