System.Data Namespace DataRowView Class
Returns the DataRow being viewed.
Script |
[ DataRow variable = ] DataRowView.Row |
The property is read only with no default value.
The following example uses the Row property to print the value of the third column in each modified row of a DataView.
private void ShowColumn3 ( ) {
DataView dv = ( DataView ) myGrid.DataSource;
// set the filter to display only those rows that were modified.
dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
// change the value of the CompanyName column for each modified row.
foreach ( DataRowView drv in dv ) {
Response.Write ( drv.Row [ 2 ] );
}
}
Private Sub ShowColumn3 ( )
Dim dv As DataView = CType ( myGrid.DataSource, DataView )
' set the filter to display only those rows that were modified.
dv.RowStateFilter = DataViewRowState.ModifiedCurrent
' change the value of the CompanyName column for each modified row.
Dim drv As DataRowView
For Each drv In dv
Response.Write ( drv.Row ( 2 ) ) )
Next drv
End Sub |
|
C# |
VB |
DataRowView Members DataRow