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!

DataSet.DefaultView

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;

Property Value

A DataSetView.

Remarks

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.

Example [Visual Basic]

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

See Also

DataSet Class | DataSet Members | System.Data Namespace | TableSetting | TableSettingsCollection | DataViewRowState