The following code snippet adds a Combo Box control to the fifth column of the Data Grid View control: '---add columns to the Data Grid View control--- Data Grid View1.
An alternative way would be to add the items to the Data Grid View Combo Box Column control directly, as shown: '---adding columns--- Data Grid View1.
If you want to do something other than that then you do it elsewhere and if you're not doing that then you don't handle Cell Validating at all.
That is all you do in the Cell Validating event handler.
In this case, you need to add a Combo Box to the cells in the desired column. Add("Price", "Price") '---add a combobox column--- Dim combo Box Col As New Data Grid View Combo Box Column '---set the header text--- combo Box Col. This event is fired when the user tries to edit the Combo Box control: Private Sub Data Grid View1_Editing Control Showing( _ By Val sender As Object, _ By Val e As System. Editing Control Showing Dim combo Box Column As Data Grid View Combo Box Column = _ Data Grid View1. Now, since so many books use the Cell Validating event, I wonder if there is not any gotcha (in display for example) with using the Cell Value Changed?I understand that the impact in performance should be irrelevant when using simple validation and conditional highlighting rules but I would as much prefer it not to run useless code everytime the user moves to another cell if it can be avoided.