Gets a custom "view" of the data contained by the DataSet, one that allows filtering, searching, and navigating through the custom data view.
[Visual Basic] Public ReadOnly Property DefaultView As DataSetView [C#] public DataSetView DefaultView {get;} [C++] public: __property DataSetView* get_DefaultView(); [JScript] public function get DefaultView() : DataSetView;
A DataSetView.
The DataSetView returned by the property allows you to create custom settings for each DataTable in the DataSet. By adding TableSetting objects to the TableSettingsCollection, each table is automatically configured to display rows according to desired sort, expression, and DataViewRowState values.
The following example gets the default DataSetView for a DataSet, and adds a TableSetting to the TableSettings collection.
[Visual Basic]
Private Sub GetDefaultView() Dim dsv As DataSetView ' Get a DataSet object's DefaultView. dsv = DataSet1.DefaultView ' Add a TableSetting to the TableSettings collection. Dim ts As TableSetting ts = New TableSetting(DataSet1.Tables(0), "CompanyName", _ "CompanyName < 'J'", DataViewRowState. dsv.TableSettings.Add ts End Sub
DataSet Class | DataSet Members | System.Data Namespace | TableSetting | TableSettingsCollection | DataViewRowState