DataView.AddNew Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new row to the DataView.
public:
virtual System::Data::DataRowView ^ AddNew();
public virtual System.Data.DataRowView AddNew ();
abstract member AddNew : unit -> System.Data.DataRowView
override this.AddNew : unit -> System.Data.DataRowView
Public Overridable Function AddNew () As DataRowView
Returns
A new DataRowView object.
Examples
The following example uses the AddNew method to return a new DataRowView that has been added to the DataTable.
private void AddNewDataRowView(DataView view)
{
DataRowView rowView = view.AddNew();
// Change values in the DataRow.
rowView["ColumnName"] = "New value";
rowView.EndEdit();
}
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
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.