Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataSet.DefaultViewManager Property

Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.

[Visual Basic]
Public ReadOnly Property DefaultViewManager As DataViewManager
[C#]
public DataViewManager DefaultViewManager {get;}
[C++]
public: __property DataViewManager* get_DefaultViewManager();
[JScript]
public function get DefaultViewManager() : DataViewManager;

Property Value

A DataViewManager.

Remarks

The DataViewManager returned by the DefaultViewManager property allows you to create custom settings for each DataTable in the DataSet.

When you obtain a DataView from a DataTable, the sort order, filtering, and DataViewRowState are configured according to the settings in the DefaultViewManager property.

Example

[Visual Basic] The following example gets the default DataViewManager for a DataSet, and adds a DataTable to the DataTableCollection.

[Visual Basic] 
Private Sub GetDefaultDataViewManager()
   Dim  myDataView As DataViewManager
   ' Get a DataSet object's DefaultViewManager.
    myDataView = DataSet1.DefaultViewManager
   ' Add a DataTable to the DataTableCollection.
   Dim myDataTable As DataTable
   myDataTable = New DataTable("MyTableName")
   myDataView.DataSet.Tables.Add(myDataTable)
End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataSet Class | DataSet Members | System.Data Namespace | DataTable | DataTableCollection | DataViewRowState

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft