Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I put a calculated field in a grid?
Message
 
 
À
03/02/1999 16:55:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00183638
Message ID:
00183674
Vues:
20
>Hey Joe,
>The easiest way is to assign ControlSource in Grid.Init (or later on, when you know exactly the value of the control source). Experimenting with UDF in CS usually tends to cause funky errors and weird grid behavior...
>However, if you have to have this UDF, post the code...
>
>>I put a function in the ControlSource of one of my columns and now I get a blank grid!
>>
>>My function is being passed a numeric argument and I read something in the Dec98 FoxAdvisor that said I couldn't do that, so it suggested passing a dummy character argument as well to get around it.
>>
>>Still no luck...
>>
>>Any ideas?

Actually, my objective is to have a thin column with a single character that indicates which record i'm on in the grid. I've already got a Grid property called nCurrRec which is being updated to reflect the current record. I need the funtion in my ControlSource so I can say something like:
IIF(RECNO()=THIS.parent.ncurrrec, "*", "")
So I can flag the actual record that I'm on

I HAVE looked at another way of indicating the current record by highlighting every column of the current record, but it takes too long.

Any other ideas?
Independant Foxpro Developer
Spring Hill, FL
jpirola@tampabay.rr.com
352/686-8373
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform