B
Bill nguyen
I need help to set selected value of combobox column in DGV.
I went this far then got stuck on what to do next:.
How do I set "selected Value" of comboboxpayCode to value of column PayCode
? That is earningCode = payCode.
I can't find .selectedValue in DatagridView ComboboxColumn .
Thanks
Bill
-------------------------
col = .Columns.Add("pCode", "Code")
..Columns(col).Width = 60
..Columns(col).DataPropertyName = "payCode"' Dim comboboxPaycode As New
DataGridViewComboBoxColumn()
..Columns.Insert(4, comboboxPaycode)
..Columns(4).Width = 120
..Columns(4).HeaderText = "Code Desc"
With comboboxPaycode
..DataSource = dCombo.Tables(0)
..ValueMember = "earningCode"
..DisplayMember = "codeDescript"
End With
I went this far then got stuck on what to do next:.
How do I set "selected Value" of comboboxpayCode to value of column PayCode
? That is earningCode = payCode.
I can't find .selectedValue in DatagridView ComboboxColumn .
Thanks
Bill
-------------------------
col = .Columns.Add("pCode", "Code")
..Columns(col).Width = 60
..Columns(col).DataPropertyName = "payCode"' Dim comboboxPaycode As New
DataGridViewComboBoxColumn()
..Columns.Insert(4, comboboxPaycode)
..Columns(4).Width = 120
..Columns(4).HeaderText = "Code Desc"
With comboboxPaycode
..DataSource = dCombo.Tables(0)
..ValueMember = "earningCode"
..DisplayMember = "codeDescript"
End With