J
JC Voon
Hi:
I have two combo boxes on screen that when one's selection is change
the
other's items will be updated to reflect the
change
dtMaster = ....
ds.Tables.Add(dtMaster)
dtDetail = ...
ds.Tables.Add(dtBranch)
rel = New DataRelation("MasterDetail", dtMaster.Columns("Code"),
dtDetail.Columns("Code"))
ds.Relations.Add(rel)
cboMaster.DataSource = ds.Tables("Master")
cboMaster.DisplayMember = "Name"
cboMaster.ValueMember = "Code"
cboDetail.DataSource = ds.Tables("Detail")
cboDetail.DisplayMember = "Name"
cboDetail.ValueMember = "Code"
Now, when the user changes the cboMaster, the cboDetail should show
only the record related to the cboMaster, but it show all !
How do i correct this?
Thanks
JCVoon
I have two combo boxes on screen that when one's selection is change
the
other's items will be updated to reflect the
change
dtMaster = ....
ds.Tables.Add(dtMaster)
dtDetail = ...
ds.Tables.Add(dtBranch)
rel = New DataRelation("MasterDetail", dtMaster.Columns("Code"),
dtDetail.Columns("Code"))
ds.Relations.Add(rel)
cboMaster.DataSource = ds.Tables("Master")
cboMaster.DisplayMember = "Name"
cboMaster.ValueMember = "Code"
cboDetail.DataSource = ds.Tables("Detail")
cboDetail.DisplayMember = "Name"
cboDetail.ValueMember = "Code"
Now, when the user changes the cboMaster, the cboDetail should show
only the record related to the cboMaster, but it show all !
How do i correct this?
Thanks
JCVoon