Hello,
I am having three comboboxes from where I have to choose three different datas.
I have used the following method and it works well.
To reduce my coding I used only one dataset DS and set it as datasource for all three comboboxes. When I tried this way, if a choose a data field say record 1 for one combobox, the datafield for the rest of the two gets automatically changed to record 1.
So if I have to choose one data set where should I modify.
Thanks
I am having three comboboxes from where I have to choose three different datas.
I have used the following method and it works well.
To reduce my coding I used only one dataset DS and set it as datasource for all three comboboxes. When I tried this way, if a choose a data field say record 1 for one combobox, the datafield for the rest of the two gets automatically changed to record 1.
So if I have to choose one data set where should I modify.
Thanks
VB.NET:
CMR
myCon = New SqlConnection("server=ABC;Trusted_Connection=yes;database=BankDetails")
myAda = New SqlDataAdapter("Select Convert(varchar(20),pid)+space(2)+ name as col1 from CustomerDetails", myCon)
myAda.Fill(DS, "customerdetails")
myAda.Fill(DS1, "customerdetails")
myAda.Fill(DS2, "customerdetails")
cbFHOLDER.DataSource = DS.Tables("CustomerDetails")
cbSHOLDER.DataSource = DS1.Tables("CustomerDetails")
cbNOMINEE.DataSource = DS2.Tables("CustomerDetails")
cbFHOLDER.DisplayMember = "col1"
cbSHOLDER.DisplayMember = "col1"
cbNOMINEE.DisplayMember = "col1"
Last edited by a moderator: