Hey,
i have one table, eg.column 1 is product categories, column 2 is product name for each categories.
I want to create 2 combo box, combobox1 is product categories, and the combobox2 will automatically show all the product name for the selected product categories.
Can some one help me to finish the code below or any better suggestion.
PrivateSub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim ProductType AsString
ProductType = ComboBox1.SelectedValue.ToString
Dim drProductType As DataRow
drProductType = DataSet11.Product(ProductType)
Dim product As DataRow()
product = drProductType.?????
ComboBox2.Items.Clear()
Dim drorder As DataRow
ForEach drorder In product
ComboBox2.Items.AddRange(drorder("colum2"))
Next
EndSub
Thanks
i have one table, eg.column 1 is product categories, column 2 is product name for each categories.
I want to create 2 combo box, combobox1 is product categories, and the combobox2 will automatically show all the product name for the selected product categories.
Can some one help me to finish the code below or any better suggestion.
PrivateSub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim ProductType AsString
ProductType = ComboBox1.SelectedValue.ToString
Dim drProductType As DataRow
drProductType = DataSet11.Product(ProductType)
Dim product As DataRow()
product = drProductType.?????
ComboBox2.Items.Clear()
Dim drorder As DataRow
ForEach drorder In product
ComboBox2.Items.AddRange(drorder("colum2"))
Next
EndSub
Thanks