Hi Guys,
I have a datagridview control in my form. It has a few combo box type columns. What I want is to dynamically populate them ? No databases.
I am getting error "DataGridViewComboBoxCell value is not valid" when I populate the combo cell values manually.
For e.g. in DataGridView1_EditingControlShowing event, I wrote :
If DataGridView1.CurrentCell.ColumnIndex = 1 Then
Dim combo As ComboBox = CType(e.Control, ComboBox)
combo.Items.Add("Hello")
combo.Items.Add("Bye")
End If
Next I wanted to write that if value in col 1 is abcd then populate ... values in col 2. But I am getting the same error.
Can individual cells (combo type) have different values.
Please let me know what mistake I am making.
Thank you,
Cheers,
GR
I have a datagridview control in my form. It has a few combo box type columns. What I want is to dynamically populate them ? No databases.
I am getting error "DataGridViewComboBoxCell value is not valid" when I populate the combo cell values manually.
For e.g. in DataGridView1_EditingControlShowing event, I wrote :
If DataGridView1.CurrentCell.ColumnIndex = 1 Then
Dim combo As ComboBox = CType(e.Control, ComboBox)
combo.Items.Add("Hello")
combo.Items.Add("Bye")
End If
Next I wanted to write that if value in col 1 is abcd then populate ... values in col 2. But I am getting the same error.
Can individual cells (combo type) have different values.
Please let me know what mistake I am making.
Thank you,
Cheers,
GR