C datagridview cellvalidating
Since you have not added your new row yet it should validate OK.
Or if not, then it is because the user has entered an invalid value in the current cell.
Canceling this event prevents the user from exiting the cell until a valid value is entered or the edit process is canceled (via Esc key).
The Data Bound Item will be updated only if the cell is validated.
Thanks, Rajni Shekhar I fill the information in the Datagridview from Folder, Folder contains File Name, File Size, File Path. S Validating is used when you want to validate any value like value must be integer.
User select a row and edit the First Column, First Column Contains File Name. and Cell Parsing occures when you want Cell Parsing event is used to provide custom value conversion to the required type you have a button to update records in your form, if so you can write code on button click to update folder name by using directory class.
SOLUTION To achieve data validation prior the row is committed, you can handle the Cell Validating event, which is raised by the control when the current cell changes or when it goes out of edit mode.Cell Parsing: It occurs when the user leaves edit mode, regardless of whether the value of the current cell has been modified.Cell Validating: it occurs after the cell has finished validating.But the thing is when I click on a row that data was added previously and press the Add new row the cell validating event is triggered.Since you have not added your new row yet it should validate OK." yeah i think it is because of the line you have said above how can i avoid this situation???