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