DataSet.DefaultViewManager DataSet.DefaultViewManager DataSet.DefaultViewManager DataSet.DefaultViewManager Property

定义

获取 DataSet 所包含的数据的自定义视图,以允许使用自定义的 DataViewManager 进行筛选、搜索和导航。Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.

public:
 property System::Data::DataViewManager ^ DefaultViewManager { System::Data::DataViewManager ^ get(); };
[System.ComponentModel.Browsable(false)]
[System.Data.DataSysDescription("DataSetDefaultViewDescr")]
public System.Data.DataViewManager DefaultViewManager { get; }
member this.DefaultViewManager : System.Data.DataViewManager
Public ReadOnly Property DefaultViewManager As DataViewManager

属性值

示例

下面的示例获取的默认DataViewManagerDataSetDataTableCollection并将添加DataTable到。The following example gets the default DataViewManager for a DataSet, and adds a DataTable to the DataTableCollection.

Private Sub GetDefaultDataViewManager()
    ' Get a DataSet object's DefaultViewManager.
     Dim view As DataViewManager = DataSet1.DefaultViewManager

    ' Add a DataTable to the DataTableCollection.
    Dim table As DataTable
    table = New DataTable("TableName")
    view.DataSet.Tables.Add(table)
End Sub

注解

通过属性返回的DataViewManager ,您可以在中为每个DataTable创建自定义DataSet设置。 DefaultViewManagerThe DataViewManager returned by the DefaultViewManager property allows you to create custom settings for each DataTable in the DataSet.

从获取DataViewRowState时,将根据DefaultViewManager属性中的设置来配置排序顺序、筛选和。 DataTable DataViewWhen you obtain a DataView from a DataTable, the sort order, filtering, and DataViewRowState are configured according to the settings in the DefaultViewManager property.

适用于

另请参阅