Hi.
I have a bound DataGridView with a DataGridViewComboBoxColumn. I want to validate the value the user selects. I'm working in the grid's CellValidating() event handler. How do I get the newly selected value of the item selected in the combobox?
In the grid's CellValidating() event handler the DataGridViewCellValidatingEventArgs "e" parameter gives me the previous combobox value which is useless in this case. I need the newly selected value for validation.
Here's code from CellValidating:
int iVaseTypeID = (int)this.dataGridViewFlowers.Rows[e.RowIndex].Cells["datagridviewcomboboxcolumn_VaseType"].Value;
The iVaseTypeID value I get is the one from previously selected combobox item, not the value of the item currently shown in the list (the item the user selected).
A few lines of sample code would be appreciated. Thanks!