DataGridViewComboBox

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

Guest

I'm trying to set the value of a combo box in an unbound DataGridView.

Some code is as follows.

Dim dgr As New DataGridViewRow
dgr.CreateCells(grdBuildingComponents) 'set row with design time column
structure

dgr.Cells(0).Value = dr(0)
dgr.Cells(1).Value = rowcount
dgr.cells(2).value = ?

....where dgr.cells(2) is defined as a combobox through the designer.

How do i set the value of the combo and get the text to display?
Also, when changed, how do I retrieve the value of the combo?

Basic stuff I'm sure but this has me a bit stumped...
 
Juzzy,

It seems that you are using a datarow, wherefore dr stends in a way as it is
not described. Than why do you want to use an unbound datagrid. At least I
will never do it and put not any minute in it how to do that.

Cor
 
Back
Top