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

-1

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

Nihal

4 Answers

New Answer

+3

what is the data source? alot of this can be enforced on the database side of things. https://www.w3schools.com/sql/sql_notnull.asp

+3

what is the database type?

0

Data source is loaded from the database.

0

Use cell end edit and validate each colums there