[RESOLVED] Datagridview with unbound combobox columns
Hello
I am working with an Unbound DataGridView. I would like to vary the contents of a second combobox based on what is selected in the first. I have code to add the columns and populate the first combobox, but I can't figure out how to do the second one since it can (and usually will) have a different list for each row AND the list must change when the selection in the first is changed.
The code I have so far has already been posted.
Like I said,m I wish to use this grid unbound, if someone has a bound solution, please post that, I may be able to deduce how to do it unbound based on that.
Any links or unbound tutorials would be appreciated also. I have searched and searched, but found very little.
Re: Datagridview with unbound combobox columns
I got it after hours of searching. Here is the solution :
Code:
dgvFields.Rows.Add(strFieldRow)
cmbCell = New DataGridViewComboBoxCell
Fill(cmbCell, strCriteria)
dgvFields.Rows(dgvFields.Rows.Count - 1).Cells(eGridFieldColumns.KeyField) = cmbCell
dgvFields.Rows(dgvFields.Rows.Count - 1).Cells(eGridFieldColumns.KeyField).Value = .FKeyParentField