Use cellvalidating event datagridview
Hi there, I have a question regarding datagridview in C#.
I have done the validateion for the datagridview in the cellvalidating event.
I have a Data Grid View that I am using the Cell Validating event when the User tabs out of a cell.
So, I have the following in the Cell Validating event with all the other code to change the Main Form and show the other Grid: dgrd GLCoding. VIN LINE ITEMS" However, that is not showing up anywhere..in the cell that the User tabbed out of or the cell the User tabbed into.
I used this event because I wanted to fire off a certain order of events, but only when the user changes the value of a cell.
I have not noticed much in the way of a performance hit (tested with 100 - 5000 rows).
Hi there, I have a question regarding datagridview, I add data to the datagridview in an interface and all the validation for the datagridview cell is in the datagridview cell validating event for the datagridview.
The validating event handler can only update the cell value if that value was not actually changed during editing. In your actual setup indeed it is more appropriate to use the Cell End Edit event because you would want to change the actual cell`s value.
However I would also like to erase the content of the cell currently in edit mode.
We have a simple datagrid where the first column contains a Vendor Number and the second is a read-only column containing the name of that vendor.
Can you assist in helping me get that text in the cell?
Thanks, jimbo99999 You cannot do that in the Cell Validating event.