Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculated field in grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00682209
Message ID:
00682250
Views:
16
This message has been marked as a message which has helped to the initial question of the thread.
You can call function from the ControlSource of a Grid column...Create a method on the form, let's call it CalculateMe(), Grid1.Column1.ControlSource = "Thisform.CalculateMe()"

In the method, you can put your own code and return the result, which will be displayed in the Column.


e.g.
>I want to display text in a text box in a column of a grid. The value displayed depends on the value in another field in the grid control source table. I tried putting code in the text box When method to calculate the value and assign it to THIS.VALUE. This works OK when I click on the text box, but if I scroll the grid all of the records change to the value in the currently highlighted record. Where do I need to put the code to make each record dis[lay the correct value for each record?
>
>Thanks.
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform