The DataView object doesn't have a Rows property like DataTable.
How do I loop through the rows of a DataView?
The DataView object doesn't have a Rows property like DataTable.
How do I loop through the rows of a DataView?
You can iterate DefaultView as the following code by Indexer:
DataTable dt = new DataTable();
// add some rows to your table
// ...
dt.DefaultView.Sort = "OneColumnName ASC"; // For example
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow oRow = dt.DefaultView[i].Row;
// Do your stuff with oRow
// ...
}