Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get grid to show a translated field value
Message
From
09/02/2009 18:16:53
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
09/02/2009 13:57:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01380336
Message ID:
01380431
Views:
123
Try Column.Bound = .F. and Column.Sparse = .F.

>>>Hi,
>>>
>>>I placed a textbox inside a grid column, deleting the previously existing textbox. The new textbox is a subclass of a Codemine class which translates the table.field contents from a decimal time to an hour:minutes format.
>>>
>>>I verified that the mechanism correctly places the expected value in textbox.value, but the grid does not show the textbox.value, but rather the column.controlsource's value. If I make column.controlsource = table.field then the decimal value is presented to user, naturally. If I leave the column.controlsource blank, hoping that VFP would use textbox.value, then the first column of the table is shown.
>>>
>>>Any suggestions?
>>>
>>>TIA,
>>>
>>>Alex
>>
>>Use the function for column's controlsource, e.g.
>>
>>column.ControlSource = '=thisform.Translate(myTable.myField)' or just a function here.
>
>Thank you, Naomi,
>
>The binding needs to go both ways. That is, it must allow editing, and the formula to translate in one direction is different than the other :(
>
>Is it possible to tell VFP (perhaps at runtime) that the controlsource of the grid column is in fact this.textbox.value or something similar? In other words that the controlsource of the grid column is the property of another object?
>
>Thanks,
>
>Alex
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform