|
-
February 1st, 2006, 08:20 AM
#1
How to assign columns of two diferent tables to "valuemember" and "displaymember" pro
Hello friends.
I have a quite peculiar problem.
I would like to have a combobox that showed values of a field (key primary of a table) and besides I would like to record this value in another different field of a diferent table (that it would be foreign key). I know that with ADO this fact was possible if you used the properties BoundColumn and BoundText of the DataCombo control, but with ComboBox control of VisualBasic.NET I can´t.
I have filled up the DataSet with the two tables, I´ve even established its relation, and I´ve assigned the DataSet to the DataSource property of ComboBox control. I´ve also assigned the name of the column that I want to the ValueMember property (like this: mydataset.Tables(0).Columns("mycolumn").tostring) and i´ve assigned the name of the other column of the other table to the DisplayMember property, in the same way. But the program sends a generic exception to me that does not help me much:"Cannot bind to the new display member.
Parameter name: newDisplayMember".
If you can help me I would be tremendously thankful .
Thank you very much!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|