Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text field in grid
Message
From
24/05/2001 10:21:54
 
 
To
24/05/2001 10:01:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00510848
Message ID:
00510896
Views:
12
Hi!

Well, you can do that using a custom refreshing control, if you want that complex. Set columns Sparse to .F., set columns control source to field, set control source of textbox to nothing (remember that each time you change Control Source of column, control source of text box is populated automatically, so need to clear it). Than assign a function/method call to the DyamicCurrentCoontrol (or other Dynamic*) property. In that function just assign the result of your formule to teh Value property of textbox, refresh it than return whatever required to return for the Dynamic* property you used to be a default. This way, your function/method will be called for each row, so for each row you refresh textbox value manually, despite the control source of column remains anything you want.

HTH.

>Hi Marcia/Cetin,
>
>Yes prod_type is a field in the table
>Setting the columns controlsource works - only problem is that my grid baseclass looks to the columns controlsource to get the column heading from my data dictionary. :(
>
>Is there any other way of doing something like this.. the field is readonly so I don't want to use a Combo, but this is basically the effect I want.. a combo with a column bound to a data source.
>
>the old 2.x spinner format (where you give it a list of items and you can press space to cycle through them) does that still exist and would it be suitable?
>
>Last resort.. I could create another column with the text data I want to display.
>
>Any suggestions?
>
>TIA
>
>W(no h!)ill
>
>>Hi Whil.
>>
>>>>the browse command was as follows
>>
>>disp_type = IIF(prod_type=1, "Intl", IIF(prod_type=2,"Ded",""))
>>
>>
>>nothing special.. but how do I do the same thing in a grid's textbox? <<
>>
>>Put this in the controlSource for the column:
>>
>>( IIF(prod_type=1, "Intl", IIF(prod_type=2,"Ded","")) )
>>
>>I am assuming that prod_type is a field in the table you are using for the grid's RecordSource.
>>
>>Marcia
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform