asp.net.ph

DataSet.DefaultViewManager Property

System.Data Namespace   DataSet Class


Returns a custom view of the data contained by the DataSet that allows filtering, searching, and navigating using a custom DataViewManager.

Syntax


Script [ DataViewManager variable = ] DataSet.DefaultViewManager

Property Value


variable Returns the DataViewManager object.

The property is read only with no default value.

Remarks

The DataViewManager returned by the DefaultViewManager property allows you to create custom settings for each DataTable in the DataSet. When you add DataTable objects to the DataTableCollection, each table is automatically configured to display rows according to the specified property settings of the DataView, including sort order, filtering, and DataViewRowState.

Example

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

Private Sub GetDefaultDataViewManager ( )
   Dim  myDataView As DataViewManager
   ' get a DataSet object's DefaultViewManager.
    myDataView = myDataSet.DefaultViewManager
   ' add a DataTable to the DataTableCollection.
   Dim myDataTable As DataTable
   myDataTable = New DataTable ( "MyTableName" )
   myDataView.DataSet.Tables.Add ( myDataTable )
End Sub
See Also

DataSet Members   DataTable   DataTableCollection   DataViewRowState Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph