NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataView.RowStateFilter

Gets or sets the row state filter used in the DataView.

[Visual Basic]
Public Property RowStateFilter As DataViewRowState
[C#]
public DataViewRowState RowStateFilter {get; set;}
[C++]
public: __property DataViewRowState get_RowStateFilter();
public: __property void set_RowStateFilter(DataViewRowState);
[JScript]
public function get RowStateFilter() : DataViewRowState;
public function set RowStateFilter(DataViewRowState);

Property Value

One of the DataViewRowState values. Possible values include: None, Unchanged, New, Deleted, ModifiedCurrent, ModifiedOriginal, OriginalRows, and CurrentRows. The default is CurrentRows.

Remarks

Only rows that have been deleted using the Delete method will have their RowStateFilter value set to Deleted. Those rows added using the AddNew method will similarly have the property set to New.

Note   Using the Remove method of the RowsCollection class does not mean that a row will be marked as Deleted. Use the Delete method instead to ensure such rows can be viewed in the DataView.

New rows will also be visible when the RowStateFilter is set to ModifiedCurrent or CurrentRows.

Deleted rows will also be visible when the RowStateFilter is set to ModifiedOriginal and OriginalRows.

Example [Visual Basic]

The following example creates a DataView and sets its RowFilter property.

[Visual Basic]

Private Sub MakeDataView()
   Dim dv As DataView
   dv = New DataView
   With dv
      .Table = DataSet1.Tables("Suppliers")
      .AllowDelete = True
      .AllowEdit = True
      .AllowNew = True
      .RowFilter = "City = 'Berlin'"
      .RowStateFilter = DataViewRowState.ModifiedCurrent
      .Sort = "CompanyName DESC"
   End With
   
   ' Simple bind to a TextBox control
   Text1.Bindings.Add("Text", dv, "CompanyName")
End Sub

See Also

DataView Class | DataView Members | System.Data Namespace | DataViewRowState | AddNew | Delete