NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataView.AddNew

Adds a new row of data.

[Visual Basic]
Overridable Public Function AddNew() As DataRowView
[C#]
public virtual DataRowView AddNew();
[C++]
public: virtual DataRowView* AddNew();
[JScript]
public function AddNew() : DataRowView;

Return Value

A DataRowView.

Example [Visual Basic]

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

[Visual Basic]

Private Sub AddNewDataRowView(dv As DataView)
   Dim drv As DataRowView
   drv = dv.AddNew
   ' Change values in the DataRow.
   drv(0) = "New value"
End Sub

See Also

DataView Class | DataView Members | System.Data Namespace | AllowNew | DataRowView