steve_mick972
asked on
DataTable Traversal.
I have a DataTable with one Column and four Rows.
How do i iterate through this an load the string values into an array list.
ArrayList myList = new ArrayList();
foreach(DataRow dRow in dt.Rows)
{
foreach(DataColumn dCol in dRow)
{
// What do i do here. ?
// or is there any better way to do it, because there is only one column and multiple rows.
}
}
thanks,
steve.
How do i iterate through this an load the string values into an array list.
ArrayList myList = new ArrayList();
foreach(DataRow dRow in dt.Rows)
{
foreach(DataColumn dCol in dRow)
{
// What do i do here. ?
// or is there any better way to do it, because there is only one column and multiple rows.
}
}
thanks,
steve.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
foreach(DataRow dRow in dt.Rows)
myList.Add(dRow[0]);