RowStateFilter
DataViewRowStatestate
= DataView.RowStateFilter; DataView.RowStateFilter =state
;
Gets or sets a value that determines how rows are filtered based on
their DataRowState
. You set the
RowStateFilter
property using one of the values
from the DataViewRowState
enumeration (or a
bitwise combination of values). These values are shown in Table 28-1. By default, the
RowStateFilter
is set to
CurrentRows
and shows everything except rows that
are scheduled for deletion.
The following code snippet configures a view to display only deleted and added rows:
// Show deleted and added rows. view.RowStateFilter = DataViewRowState.Deleted | DataViewRowState.Added;
The values in the DataViewRowState
enumeration
don’t exactly correspond to the values in the
DataRowState
enumeration. This is because the
DataViewRowState
must take into account the state
of rows (deleted, added, and so on) and indicate which version of the
information should be used for display purposes (the current
information or the original data queried from the data source).