Gets or sets the DataSet to be viewed.
[Visual Basic] Public Property DataSet As DataSet [C#] public DataSet DataSet {get; set;} [C++] public: __property DataSet* get_DataSet(); public: __property void set_DataSet(DataSet*); [JScript] public function get DataSet() : DataSet; public function set DataSet(DataSet);
A DataSet to be viewed.
Exception Type | Condition |
---|---|
Exception | The DataSet for this DataSetView is already set to the DefaultView of a DataSet. |
The following example creates a new DataSetView and sets the DataSet property.
[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
DataSetView Class | DataSetView Members | System.Data Namespace | DataSet