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!

TableSetting.RowStateFilter

Gets or sets the row state of the table.

[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. The default is CurrentRows.

Example [Visual Basic]

The following example creates a DataSetView and adds two TableSetting objects to the TableSettingsCollection. The first TableSetting sorts according to the CompanyName column and filters out all rows except for those named like "Smith." The second table sorts according to the OrderDate column, and filters out all non-null columns.

[Visual Basic]

' The next two lines go into the Declarations section of the module:
Private myDataSetView As DataSetView
' CustomerOrders is a class derived from DataSet.
Private CustOrders As CustomerOrders


Private Sub CreateDataSetView()
   ' Not shown: CustomerOrders is already configured with tables, relations, constraints.
   myDataSet = New CustomerOrders
   myDataSetView = New DataSetView(myDataSet)
End Sub

Private Sub AddTableSettings()
   ' Create TableSetting and add it to TableSettingsCollection.
   Dim ts As TableSetting
   Dim srt As String
   Dim flt As String

   ' Sort by CompanyName column.' Filter out all rows except for rows where CustomerID = 'Smith'

   srt = "CompanyName"
   flt = "CustomerID = 'SMITH'"   
   ts = New TableSetting(myDataSet.Tables("Suppliers"),srt, flt, DataViewRowState.CurrentRows)
   myDataSetView.TableSettings.Add(ts)

   ' Create and add second TableSetting.

   ts = New TableSetting(myDataSet.Tables("Orders"))
   ts.Sort = "OrderDate"
   ts.RowFilter = "IsNull(ShippedDate, 'null') = 'null'"
   myDataSetView.TableSettings.Add(ts)
End Sub

See Also

TableSetting Class | TableSetting Members | System.Data Namespace | Table | Expression | Sort | TableSetting