2 combobox master-detail

i have three tables:

CountryTable: CountryId,CountryName,Description

CityTable: CityId,CityName,Description

I would hace tho combobox,the first one for Country and second for City

the second combobox (CityCombobox) should show only Cities that belong to the selected country on the first combobox (CountruComboBox).

i use a look up table :

CountryCity: CountryId,CityId

i have 2 relations:

rel1:

ParentTable=CountryTable

ChildTable=CountryCity

ParentKey=CountryId

ChildKey=CountryId

rel2:

ParentTable=CityTable

ChildTable=CountryCity

ParentKey=CityId

ChildKey=CityId

the 3 tables belong to dataset ds

CountryComboBox.DataSource = ds

CountryComboBox.DisplayMember = "CountryTable.CountryName"

CountryComboBox.ValueMember = "CountryTable.CountryId"

what are the settings (datasource,displaymember,valuemember) for the CityCombobox

I would the the CityComboBox show CityName !!!!

PLEASE help me !!!!



Answer this question

2 combobox master-detail