Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid.Columns(i).controlsource problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00404935
Message ID:
00405073
Vues:
45
Yes, I figured this already. How can I make the column edittable, but display 'N','Y' instead of .t./.f.?

Thanks in advance.

>The problem is you're using a literal string as the controlsource for the column. If you want to edit the column, you need to use a field for the controlsource.
>
>

>>Hi everybody,
>>
>>I have this fragment of code in Grid.Init:
>>
>> with this.columns(i)
>>     if type(lafieldlist[i])="L"
>>          if lcCaption"ADCDesc"
>>               .controlsource=[IIF(]+lafieldlist[i]+[, 'N', 'Y')]
>>          else
>>               .controlsource=[IIF(]+lafieldlist[i]+[, 'Y', 'N')]
>>          endif
>>     else
>>          .controlsource = lafieldlist[i] && Assign controlsource
>>     endif
>>
>>It works fine while grid is ReadOnly. Now I want to make these logical fields edittable in Form.EditMode. My question is: how can I make them edittable and preserve original formatting, e.g. true (.t.) equals 'N' and false (.f.) equals "Y"?
>>
>>Thanks in advance for your suggestions.
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