VB .net combo box problem
Um kind of newbie and need a lil help working with combobox
firstly there are two tables in the database "Batch" & "Products"
which are linked by ProductID in Batch Table
The design time binding are done as follows:
FOR COMBO BOX1 - Product Name
DataSource: DataSet.Product
DisplayMember: ProductName
ValueMember: ProductID
SelectedValue: DataSet - Batch.ProductID
FOR COMBO BOX2 - Product Type
DataSource: DataSet.Product
DisplayMember: ProductType
ValueMember: ProductID
SelectedValue: DataSet - Batch.ProductID
Everything goes fine as long as i'm displaying the data in combo box while traversing through batches but when Add button is clicked to add new batch and time comes to select the product name the product type automatically gets change with product name - Thats good enuff! but on some index at random it shows the product type combo box blank.
When i tried to display the data of product type in a msgbox on SelectedIndex_change of ProductName (just to check) it perfectly gives wat shud've been written in ProductType Combobox . ..
HELP ME cuz it has already costed me 2 days!!
|