How to get selectedItem in DatagridviewComboBoxCell

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 !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top