Hello,
i have the following situation:
1 DataTable containing Questions (qID, question)
1 DataTable containing Answers (aID, answer)
1 DataTable connection the Questions to the (multiple! ) Answers. (qaID, qID, aID)
now I want to bind a Combobox and/or a CheckedListBox to this tables.
Combobox for questions with one possible answer,
CheckedListBox for those with n possible answers.
How can I realize this with standard Databinding In my project all the databinding is done during runtime, not designtime.
thank you!

Databinding to n:n Table
Ahmad_Jafari
Load both Master and Details queries in DataSet. Bind the master data grid to the Master dataset table. Create a relationship that describes how two tables relate to each other. A primary key foreign key relationship is defined by two attributes. Set the data member for the details table to be the name of relationship that was added to the dataset.
'' The master view
dataAdapterMaster.Fill(DS, "Question")
dataAdapterDetails.Fill(DS, "Answer")
gridCust.DataSource = DS
gridCust.DataMember = "Question"
''The primary key column in the master table
''The foreign key coumn in the details table
''The created relationship is added to the dataset.
DS.Relations.Add("Ques2Ans",DS.Tables["Question"].Columns ["qID"], DS.Tables["Answer"].Columns["aID"])
'' The name of the relation is to be used as the DataMember for the
'' details view
gridDtls.DataSource = DS
'' use the relationship called "CustomersToOrders in the Customers table.
'' Remember that we called the relationship "CustomersToOrders".
gridDtls.DataMember = "Question.Ques2Ans"