T
Tony Dong
Hi there
I have three comboBoxs
I need the first comboBox selected and fill the second comboBox, after
second comboBox selected, it will fill the last comboBox, When I use
selectedIndex change event, it happens before I select second comboBox,
because when I selected first one, it auto fill the second one and make the
selectedindexchanged event happen, how can I disable it untial I select
second comboBox?
how can I do to make this one working?
the code as follow
Thanks
Tony
Private Sub cmbLastName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbLastName.SelectedIndexChanged
Dim bl As New BusinessLogic
cmbFirstName.DataSource =
bl.FillClientsFirstNameInfo(cmbLastName.Text).Tables(0).DefaultView
cmbFirstName.DisplayMember = "ClientsFirstName"
cmbFirstName.ValueMember = "CustomerID"
End Sub
Private Sub cmbFirstName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbFirstName.SelectedIndexChanged
MessageBox.Show(cmbFirstName.SelectedValue.ToString)
End Sub
I have three comboBoxs
I need the first comboBox selected and fill the second comboBox, after
second comboBox selected, it will fill the last comboBox, When I use
selectedIndex change event, it happens before I select second comboBox,
because when I selected first one, it auto fill the second one and make the
selectedindexchanged event happen, how can I disable it untial I select
second comboBox?
how can I do to make this one working?
the code as follow
Thanks
Tony
Private Sub cmbLastName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbLastName.SelectedIndexChanged
Dim bl As New BusinessLogic
cmbFirstName.DataSource =
bl.FillClientsFirstNameInfo(cmbLastName.Text).Tables(0).DefaultView
cmbFirstName.DisplayMember = "ClientsFirstName"
cmbFirstName.ValueMember = "CustomerID"
End Sub
Private Sub cmbFirstName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbFirstName.SelectedIndexChanged
MessageBox.Show(cmbFirstName.SelectedValue.ToString)
End Sub