asp.net.ph

DataView.AddNew Method

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;

Return Value

A DataRowView.

Example

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";
}
  C# VB

See Also

DataView Members   AllowNew   DataRowView Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph