codequest
asked on
Drop Down List From DataTable - Display One Value, Capture Associated Index
I'd like to have a set-up for a FormView Insert Template Field (call it "ListValue") ( for Table A ) that would act like this:
A) A drop down list DD is populated from a datatable B (another table)
B) When an item from the drop down list DD is selected
i) the item displayed in the drop down field shows on a field on the Template ("DisplayField")
ii) the Primary Key from the datatable B, associated with the drop down list selected item, would be bound to the Table A "List Value" field.
Any suggestions, starting points, etc would be appreciated.
Thanks!
A) A drop down list DD is populated from a datatable B (another table)
B) When an item from the drop down list DD is selected
i) the item displayed in the drop down field shows on a field on the Template ("DisplayField")
ii) the Primary Key from the datatable B, associated with the drop down list selected item, would be bound to the Table A "List Value" field.
Any suggestions, starting points, etc would be appreciated.
Thanks!
ASKER
And then, of course, uh-duh, the Drop Down List control provides for a selected value as well as a display text, so...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This will work because there the Display Values are unique (so no ID confusion in the translation).
The Drop Down is a separate technical matter...it just happens to be the same file.