ddepuemd
asked on
Datagridview combobox column problem
I have a grid that has a column of comboboxes. I'm pulling from a database for three separate conditions and filling three datasets. I want to bind these datasets to one particular column, but only every third cell. In other words, row one should bind to ds1, row 2 to ds2, row 3 to ds3, row 4 to ds1, row 5 to ds2, etc.
I am doing this
For rw As Integer = 0 To 23 Step 3
Dim cell As New DataGridViewComboBoxCell
cell.DataSource = dsslide1
dgvNewJob.Rows(rw).Cells(1 ) = cell
Next
For rw As Integer = 1 To 23 Step 3
Dim cell As New DataGridViewComboBoxCell
cell.DataSource = dsslide1
dgvNewJob.Rows(rw).Cells(1 ) = cell
Next
I get errors and the box does not contain any data.
Any ideas what I am doing wrong?
I am doing this
For rw As Integer = 0 To 23 Step 3
Dim cell As New DataGridViewComboBoxCell
cell.DataSource = dsslide1
dgvNewJob.Rows(rw).Cells(1
Next
For rw As Integer = 1 To 23 Step 3
Dim cell As New DataGridViewComboBoxCell
cell.DataSource = dsslide1
dgvNewJob.Rows(rw).Cells(1
Next
I get errors and the box does not contain any data.
Any ideas what I am doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.