General information
Category:
Coding, syntax and commands
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only