该DataView
对象没有Rows
像这样的属性DataTable
.
如何遍历DataView的行?
DataView对象本身用于循环DataView行.
DataView行由DataRowView对象表示.该DataRowView.Row属性提供访问原始数据表中的行.
C#
foreach (DataRowView rowView in dataView) { DataRow row = rowView.Row; // Do something // }
VB.NET
For Each rowView As DataRowView in dataView Dim row As DataRow = rowView.Row ' Do something ' Next