Initializes a new instance of the DataSetView class.
[Visual Basic] Overloads Public Sub New() [C#] public DataSetView(); [C++] public: DataSetView(); [JScript] public function DataSetView();
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
DataSetView Class | DataSetView Members | System.Data Namespace | DataSetView Constructor Overload List