Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling grid display
Message
 
 
À
22/06/2009 17:12:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01407400
Message ID:
01407697
Vues:
32
>Hi,
>
>>>Hi,
>>>
>>>I have a grid column (let's call it C1) whose controlsource is a character type field (from a local view).
>>>The grid is desgined for display only (not to take input)
>>>
>>>Is it possible to conditionally display some of the values of C1 as indented (say prefix them with 3 space chars) without actually changing the value of the underlying field?
>>>The condition is derived from another field in the same view as mentioned.
>>
>>Sure, you can put an expression in ControlSource ("myPrefix" + Table.Field). This makes the column readonly, but would work for you, as I understand.
>
>Just curious, what if the view needs to take user input...
>Say the C1 contains a textbox, what can I do to achive the samething?

Do you mean the predefined part to be user's input.

In this case I think we need to set ControlSource in code

thisform.cPrefix = 'our user input'

thisform.grd1.Column1.ControlSource = "([" + thisform.cPrefix + "Table.Field" + "])"

From the top of my head - not tested.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform