Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid: ControlSource - column vs CurrentControl?
Message
De
13/12/2006 09:41:51
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01177136
Message ID:
01177147
Vues:
13
>>>>In a grid, does one normally define a column's ControlSource?
>>>>
>>>>I do set the currentcontrol's ControlSource property, but I'm unsure whether the column itself should have its ControlSource set to anything (maybe same as current control)?
>>>>
>>>>TIA
>>>
>>>Yes, column should have ControlSource property set.
>>
>>Why would one set a column's ControlSource property to a different value than the column's CurrentControl's ControlSource? Hope that question makes sense :)
>
>Hmm, I don't think I ever set it this way. I think I just always set ControlSource property of the column and not the column's object controlsource. I think column's controlsource will take precedence anyway. You may have to try it, though, to be sure.

I have a grid that I am trying to display invoice detail records in. My columns are:
ItemCode, ItemDesc, Qty, Units, Price and Extended Amt.
ItemCode is a 2-column combo box (0 - Dropdown) with RowSource = PRODUCTS.ItemCode,ItemDesc (so user sees a list of part numbers and descriptions). The grid's ItemDesc, Units & Price columns all point to corresponding fields in my PRODUCTS lookup table. ItemDesc and Units are really just informational - they do not need to be saved in the InvDetail table (invoice line items). But, I want the Price column to display the corresponding PRODUCTS.Price amount *and* update InvDetail.Price with this same value (from PRODUCTS). So, I assume that the Price column's ControlSource should be InvDetail.Price - right? Same for Price's Text1 ControlSource? Also, how do I initially populate the Price column with the matching PRODUCTS.Price value?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform