Initializes a new instance of the DataSetView class.
Initializes a new instance of the DataSetView class.
[Visual Basic] Overloads Public Sub New()
[C#] public DataSetView();
[C++] public: DataSetView();
[JScript] public function DataSetView();
Initializes a new instance of the DataSetView class using the specified DataSet.
[Visual Basic] Overloads Public Sub New(DataSet)
[C#] public DataSetView(DataSet);
[C++] public: DataSetView(DataSet*);
[JScript] public function DataSetView(DataSet);
The following example creates a new DataSetView using a given DataSet.
Note This example shows how to use one of the overloaded version of the DataSetView constructor. For other examples that may be available, see the individual overload topics.
[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() ' Not shown: SuppliersProducts is already configured with tables, relations, constraints. Set myDataSet = New SuppliersProducts Set myDataSetView = New DataSetView(myDataSet) 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