I have a DataGridViewComboBoxColumn and a DataGridViewComboBoxCell template with a DataSource, DisplayMember and ValueMember assigned. How can I read the value of the ValueMember property when a user selects an item in a corresponding DataGridViewComboBoxCell? The ComboBox class has the SelectedValue property. What would be the similar property for DataGridViewComboBoxCell or DataGridViewComboBoxColumn?
... cell.DataSource = ListBoxItems; cell.DisplayMember = "fieldLabel"; cell.ValueMember = "ID"; dgvComboBoxColumn.CellTemplate = cell; ... // The next line returns the displayed value of the cell string sVal = dgvSandbox.Rows[i].Cells[j].Value.ToString(); // How can I get the ValueMember value? ...
Rob E.