validate datagridview c# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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.

8th Nov 2017, 11:47 AM
Nihal
4 Answers
+ 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
8th Nov 2017, 11:50 AM
jay
jay - avatar
+ 3
what is the database type?
8th Nov 2017, 11:53 AM
jay
jay - avatar
0
Data source is loaded from the database.
8th Nov 2017, 11:52 AM
Nihal
0
Use cell end edit and validate each colums there
22nd Dec 2018, 6:46 PM
Nihal