1

I battle to un-select any selected items of a combobox which is inside a cell of the DataGridView.

Usually one can set SelectedIndex = -1 to un-select the items in a combobox or listbox.

Here is the code for loading the DataGridView:

Dim cls As New DBCalls
Dim ds As New DataSet
Dim bs As New BindingSource
Dim dataCell As New DataGridViewComboBoxColumn

ds = cls.showAccounts
bs.DataSource = ds.Tables(0)

dataCell.DisplayMember = "AccountNumber"
dataCell.ValueMember = "ID"
dataCell.DataSource = bs
dataCell.HeaderText = "DebitAccDrop"

dgvTransactions.Columns.Add(dataCell)

I then have a ClearRow button which is supposed to clear the current row of the DataGridView, including un-selecting the DataGridViewCombobox.

Any suggestions?

0 Answers0