DataView Constructor ()


Initializes a new instance of the DataView class.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

Public Sub New

The following example creates a new DataView.

Private Sub MakeDataView()
    Dim view As DataView = New DataView

    view.Table = DataSet1.Tables("Suppliers")
    view.AllowDelete = True
    view.AllowEdit = True
    view.AllowNew = True
    view.RowFilter = "City = 'Berlin'"
    view.RowStateFilter = DataViewRowState.ModifiedCurrent
    view.Sort = "CompanyName DESC"

    ' Simple-bind to a TextBox control
    Text1.DataBindings.Add("Text", view, "CompanyName")
End Sub

.NET Framework
Available since 1.1
Return to top