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!

DataSetView Constructor ()

Initializes a new instance of the DataSetView class.

[Visual Basic]
Overloads Public Sub New()
[C#]
public DataSetView();
[C++]
public: DataSetView();
[JScript]
public function DataSetView();

Example [Visual Basic]

The following example creates a DataSetView based on a given DataSet.

[Visual Basic]

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

Private Sub CreateDataSetView()
   myDataSet = New SuppliersProducts
   myDataSetView = New DataSetView()
   myDataSetView.DataSet = myDataSet
   ' Add Settings.
End Sub


Private Sub AddTableSettings()
   ' Create TableSetting and add it to TableSettingsCollection.
   Dim ts As TableSetting
   Set ts = New TableSetting(myDataSet.Tables("Suppliers"), "CompanyName", _
   "CompanyName < Z" & Combo1.Text, DataRowState.ModifiedCurrent)
   myDataSetView.TableSettings.Add(ts)

   ' Create and add second TableSetting.
   Set ts = New TableSetting(myDataSet.Tables("Products"), "ProductName", _
   "Discontinued = 'True'", DataRowState.CurrentRows)
   myDataSetView.TableSettings.Add(ts)
End Sub

See Also

DataSetView Class | DataSetView Members | System.Data Namespace | DataSetView Constructor Overload List