System.Data Namespace DataView Class
Adds a new row to the DataView.
[ VB ]
Overridable Public Function AddNew ( ) As DataRowView
[ C# ]
public virtual DataRowView AddNew ( );
[ C++ ]
public: virtual DataRowView* AddNew ( );
[ JScript ]
public function AddNew ( ) : DataRowView;
A DataRowView.
The following example uses the AddNew method to return a new DataRowView that has been added to the DataTable.
private void AddNewDataRowView ( DataView dv ) {
DataRowView drv = dv.AddNew ( );
// change values in the DataRow.
drv [ "ColumnName" ] = "New value";
}
Private Sub AddNewDataRowView ( dv As DataView )
Dim drv As DataRowView = dv.AddNew
' change values in the DataRow.
drv ( "ColumnName" ) = "New value"
End Sub |
|
C# |
VB |
DataView Members AllowNew DataRowView