Column Index = 2 Then '' this is the col index for qty to be transfered If .
I have a datagridview that I would like to validate using the cellvalidating event.
I need to find a workaround so that the validation will occur upon loading the Excel file, and after closing the message box place the cursor in the first cell (in case there are many) that doesn't match the condition.
_ Data Grid View Editing Control Showing Event Args) _ Handles Data Grid View1.private byte b = new byte; private bool flag; private void data Grid View1_Cell Validating(object sender, Data Grid View Cell Validating Event Args e) private void data Grid View1_Cell Parsing(object sender, Data Grid View Cell Parsing Event Args e) .
Here's what I've come up with: Suppose I load a file with a row that has 18 characters (or anything different than 17).
The Cell Validating event doesn't fire unless I click on the cell that doesn't match the validation condition and then try to leave it.
In that case, the message box shows up and then the focus is set on that cell for editing.
There are times when you need to allow the users to insert additional items into the Combo Box control.
First, service the Editing Control Showing event of the Data Grid View control.