ricio2000
Member
Hi everybody, I had an issue where I have a combobox that gets populated from a DataSet.
Dim dataTableObj As DataTable = customerDataSet.item("customer")
cbCompany.DataSource = dataTableObj
I have another comboBox named
companyType
I'm populating the cbCompany comboBox based on the value of the companyType, so I do this in the selectedIndex event. I keep getting the values repeated over and over again into the items collection of the cbCompany comboBox. I can't call the clear method of the cbCompany because it will give me a run time error indicating that i can't clear the comboBox when the DataSource is set. I tried setting the dataSource to null and then calling the clear method, but nothing will clear in the cbCompany comboBox. Can somebody help me with this ? Gracias
Dim dataTableObj As DataTable = customerDataSet.item("customer")
cbCompany.DataSource = dataTableObj
I have another comboBox named
companyType
I'm populating the cbCompany comboBox based on the value of the companyType, so I do this in the selectedIndex event. I keep getting the values repeated over and over again into the items collection of the cbCompany comboBox. I can't call the clear method of the cbCompany because it will give me a run time error indicating that i can't clear the comboBox when the DataSource is set. I tried setting the dataSource to null and then calling the clear method, but nothing will clear in the cbCompany comboBox. Can somebody help me with this ? Gracias