Information générale
Catégorie:
Code, syntaxe and commandes
Titre:
How to automatically Populate Lookup descr
Hi.
Wondering whats the most Genric Way to populate a Lookup Description in C#.
Say I have a Customer Code, Stock Code, Inventory Item etc. Once I have 'taken' and 'Validated' these from a database table, nearly always I will want a TextBox with the Desdcription of the Item right beside it (e.g. Customer Name, Stock Description,Inventory name) etc.
I know I can insert some code in the validated Event of the Main Item , do a lookup, and then populate the description.
I am looking for a more generic , self contained way of doing this, in the Description Control itself.
Sometimes, I'l be adding a New Row, other times I will be viewing Existing Rows, so dont want to have separate code to cover these, if I can avoid it.
In VFP I would have had a contol like: (iif(seek(MyLookupField,'MYAlias','MyIndex'),MyTable.Description,' ')) and then just refresh the lookup field.
Is there a generic way of doing this in C#. Any ideas or examples would be appreciated
Tia
Gerard
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement