gd2q
February 1st, 2006, 07:20 AM
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!
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!