How to get column value from datarow while datatable looping ?
Not sure if this is what you're looking for, but I've used this:
foreach (DataTable t in myDataSet.Tables)
{
foreach (DataRow r in t.Rows)
{
foreach (DataColumn c in t.Columns)
{
if (r[c] != null)
{
Console.WriteLine(r[c]);
}
}
}
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.