Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated Field in a Grid

Status
Not open for further replies.

koppelsteel

Technical User
Mar 1, 2001
9
0
0
US
I am converting some old DOS Foxpro programs to VFP 6.0. I have one program that uses the browse command where one of the columns calls a UDF to display the Status of the current order. The UDF does a lookup against other tables and returns a character string.

In my new program I am trying to use the Grid control to replace the broswe but I can't get it to display the Status value.

Can this be done? If so,how.
 
Yes that can be done easily enough.

Simply type the function name into the ControlSource for the given column - make it read only and set the sparce to false...

That works for me



Regards

Griff
Keep [Smile]ing
 
koppelsteel

As an alternative to Griff's suggestion, you could use the .DynamicCurrentControl property of the column.

This in turn would call a form method, object method or function in which the value of the textbox in the column in the grid would be calculated.

Again the .Sparse property of the column would need to be .F.

FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top