DataView.AddNew Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Adds a new row to the DataView.

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

Public Overridable Function AddNew As DataRowView

Return Value

Type: System.Data.DataRowView

A new DataRowView object.

The following example uses the AddNew method to return a new DataRowView that has been added to the DataTable.

Private Sub AddNewDataRowView(view As DataView)
    Dim rowView As DataRowView = view.AddNew

    ' Change values in the DataRow.
    rowView("ColumnName") = "New value"
End Sub

.NET Framework
Available since 1.1
Return to top