System.Data Namespace DataRowView Class
Returns the current version description of the DataRow.
Script |
[ DataRowVersion variable = ] DataRowView.RowVersion |
variable |
One of the DataRowVersion values. Possible values for the RowVersion property are: Default, Original, Current, and Proposed. |
The property is read only with no default value.
For more details, see DataRowVersion.
The following example uses the RowVersion property to determine the state of a row in the DataRowView.
private void ShowModifiedCurrentRows ( ) {
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 );
}
}
Private Sub ShowModifiedCurrentRows ( )
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 );
Next drv
End Sub |
|
C# |
VB |
DataRowView Members AcceptChanges BeginEdit DataRowVersion EndEdit