validate datagridview c# | Sololearn: Learn to code for FREE!


validate datagridview c#

0 down vote favorite I have a datagridview which have predefined columns. I want to validate the columns.certain columns needed to be validated in different format. My column names are unit_id,batch_id,exp_month,exp_year,tax_rate. The validations needed are all columns should not be null,exp_month and exp_date length should be 2 and 4 respectively and they must be not before the current date. The tax rate should be also in 2 digit. And moreover the last row which automatically added should not be considered for null values.

11/8/2017 11:47:55 AM


4 Answers

New Answer


what is the data source? alot of this can be enforced on the database side of things.


what is the database type?


Data source is loaded from the database.


Use cell end edit and validate each colums there