Datagridview cellvalidating not firing

Posted by / 31-Jul-2020 23:28

Datagridview cellvalidating not firing

What if someone is able to make a selection without a click event?

There seems to be a non-zero percent chance that this might fire incorrectly in some unforeseen situation.

In my case, Cell Value Changed has done what I wanted/needed.

EDIT The biggest thing about the Cell Validating event is that you can stop the user from leaving a cell, if the value entered does not pass your validation.

For example, this event triggers everytimes the users switches to another row.

I'd like the user to have the option of typing in the product ID or clicking a "Button" in the next column which would display another Gridview (like a Pop-Up) and allow the customer to select the product ID.

The concept is to have a button column which the user could click if he/she input the wrong ID and select the Correct One. That’s why we’re bringing professional training courses to Experts Exchange.

The problem, if the user inputs an invlaid Product ID, Cell Validating Fires and prevents the user from navagating away and clicking the Button which would display the valid options to select from. Note-I'm using a second datagridview instead of a combobox column in my initial DGV because i what to provide more information for the user to have availble like description, price, Onhand qty, etc.. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

I have not noticed much in the way of a performance hit (tested with 100 - 5000 rows).

I think in the end it depends on what your validation needs are.

datagridview cellvalidating not firing-60datagridview cellvalidating not firing-24datagridview cellvalidating not firing-38

I am manually handling the Datasource Update which is dependant on the validations. Example: I have both a "Company" column and a "Division" Column.