DataView.AddNew DataView.AddNew DataView.AddNew DataView.AddNew Method

정의

DataView에 새 행을 추가합니다.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

반환

예제

다음 예제에서는 합니다 AddNew 새 반환 하는 방법 DataRowView 에 추가 된를 DataTable입니다.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

적용 대상

추가 정보