R
Randy
I have a routine that creates a series of comboboxes, each of which is
bound to a common dataview. Everything used to work fine, but now,
when I change the value of any of the comboboxes, the value in ALL of
the comboboxes changes to the new value. I have boiled down the code
to the simplest lines and placed it on its own form, but I still get
the same behavior. I have stepped through each line of code, and I
don't see any other lines running other than the ones that I show here
and those that fill the tableadapter. Can anybody help me with this?
Private Sub test_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Me.TaJobs1.Fill(Me.TimsheetsDataSet1.Jobs)
Dim vueJob As New DataView
vueJob.Table = Me.TimsheetsDataSet1.Jobs
vueJob.Sort = "JobName"
For x As Integer = 1 To 4
Dim newJobCbo As New ComboBox
With newJobCbo
.Name = "cboJob" & x
.Size = New System.Drawing.Size(121, 21)
.Location = New Point(70, 60 + x * 23)
.DataSource = vueJob
.DisplayMember = "JobName"
End With
Controls.Add(newJobCbo)
Next
End Sub
Thanks,
Randy
bound to a common dataview. Everything used to work fine, but now,
when I change the value of any of the comboboxes, the value in ALL of
the comboboxes changes to the new value. I have boiled down the code
to the simplest lines and placed it on its own form, but I still get
the same behavior. I have stepped through each line of code, and I
don't see any other lines running other than the ones that I show here
and those that fill the tableadapter. Can anybody help me with this?
Private Sub test_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Me.TaJobs1.Fill(Me.TimsheetsDataSet1.Jobs)
Dim vueJob As New DataView
vueJob.Table = Me.TimsheetsDataSet1.Jobs
vueJob.Sort = "JobName"
For x As Integer = 1 To 4
Dim newJobCbo As New ComboBox
With newJobCbo
.Name = "cboJob" & x
.Size = New System.Drawing.Size(121, 21)
.Location = New Point(70, 60 + x * 23)
.DataSource = vueJob
.DisplayMember = "JobName"
End With
Controls.Add(newJobCbo)
Next
End Sub
Thanks,
Randy