Start Datagridview rowvalidating example

Datagridview rowvalidating example

However, the user may prefer to validate all the data cells in a row at once.

I now know the correct way to handle this and have since fixed my code, however I'd still like to know how I could have solved the bug another way.

I handle the Row Validating event and do one final validation on the row as a whole to ensure everything is cool.

For more information about handling events, see NIB: Consuming Events.

I am using a Data Grid View bound to a Binding Source that has its Data Source property set to a Data Table within a Data Set in the project.

If it is less than five characters, you set the Error Text property of that cell to some error message.

Notice how the Column Index and Row Index properties of Data Grid View Cell Validating Event Args parameter are used.

I've basically circumvented the databinding and implemented my own poor version.