How to get selectedItem in DatagridviewComboBoxCell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a DatagridviewComboBoxCell with self added object (with an id and a
string field) as items to the DatagridviewComboBoxCell.

Dim cboCell As New DataGridViewComboBoxCell
cboCell.Items.Add(new MyObj(1,"Item 1"))
cboCell.Items.Add(new MyObj(2,"Item 2"))
cboCell.Items.Add(new MyObj(3,"Item 3"))

But I cannot find a method from DataGridViewComboBoxCell
to get back the selected MyObj in the cboCell list.
I suppose there should be a selectedItem property as in a comboBox control
but it doesn't have.

Please help !!!
 
Back
Top