Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Question...
Message
From
23/08/1999 10:14:12
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Grid Question...
Miscellaneous
Thread ID:
00256561
Message ID:
00256561
Views:
52
I'm taking a look at a poject a fried of mine is working on in which he has a grid that he performs line by line calculations in. The calculations are done during a lost focus in one of the columns that updates another column further to the right of the active cell. The issue that is coming up is that when there are more than one row and he arrows from left to right and then down arrows to the next line, the calculations are firing with a value from the previous row instead of the active row. For Example:

Qty Price Total
1 1.00 1.00
2 2.00 4.00

When you arrow through the grid (up/down/left/right, etc.) He gets the following occring if he arrows left to right from qty after arrowing through line 1:

Qty Price Total
1 1.00 1.00
2 2.00 2.00

The calculation is in the lost focus of Qty and references the price columns value to calculate the total.

The only way this actually works is to arrow through the entire line to get the correct total. It seems as though the Column reference is only updating when it has been the active cell.

Now the question of the day <g>...how do you reference a columns value of the active row if you haven't made it an active cell prior to the calculations?

Does any of this make any sense that I have written. A little confusing to me as well. <g>

Thanks for any assistance.
Patrick L. Stovall
Senior Architect/Developer
MCP - C#

VeroQuest
P.O.Box 7216
Kalispell, MT 59904
Next
Reply
Map
View

Click here to load this message in the networking platform