DataView.AddNew Method ()

 

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"
    rowView.EndEdit
End Sub

.NET Framework
Available since 1.1
Return to top
Show: