A
al
Hi,
I have a WinForm with a combobox bound to a dataset and the properties
of the comb are all set correctly. It works fine until I change the
first value in the list, then proplem starts. This first value becoms
the default in all next values as you navigate in dataset (with next
or prev. buttons).
Any idea as why combobox does this???
Private Sub Mian_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
cbo.DataSource = ds.Tables("employees")
cbo.DisplayMember = "FirstName"
cbo.ValueMember = "ReportsTo"
cboreportsto.DataBindings.Add("SelectedValue", ds,
"employees.ReportsTo")
Catch ex As SqlException
MsgBox(ex.Message)
End Try
End Sub
MTIA,
Grawsha
I have a WinForm with a combobox bound to a dataset and the properties
of the comb are all set correctly. It works fine until I change the
first value in the list, then proplem starts. This first value becoms
the default in all next values as you navigate in dataset (with next
or prev. buttons).
Any idea as why combobox does this???
Private Sub Mian_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
cbo.DataSource = ds.Tables("employees")
cbo.DisplayMember = "FirstName"
cbo.ValueMember = "ReportsTo"
cboreportsto.DataBindings.Add("SelectedValue", ds,
"employees.ReportsTo")
Catch ex As SqlException
MsgBox(ex.Message)
End Try
End Sub
MTIA,
Grawsha