Home > DeveloperSection > Forums > How can I validate if the column exist in a DataRow object?
Tanuj Kumar

Total Post:134

Posted on    September-02-2014 11:52 PM

 ASP.Net ASP.Net 

 1 Reply(s)
 1238  View(s)
Rate this:

private int EmploymentID { get; set; }

private void MapFields(DataRow row)



          EmploymentID = Convert.ToInt32(row["EmploymentID"].ToString());


The code shows that it validates if the DataRow object has error on its row but I want to validate if it ever exist. Is there an approach for the code rather using HasError method of DataRow?

Sumit Kesarwani

Total Post:378

Posted on    September-03-2014 11:37 PM

You can also use this one statement


Don't want to miss updates? Please click the below button!

Follow MindStick