DataView.Delete(Int32) DataView.Delete(Int32) DataView.Delete(Int32) DataView.Delete(Int32) Method

정의

지정된 인덱스의 행을 삭제합니다.Deletes a row at the specified index.

public:
 void Delete(int index);
public void Delete (int index);
member this.Delete : int -> unit
Public Sub Delete (index As Integer)

매개 변수

index
Int32 Int32 Int32 Int32

삭제할 행의 인덱스입니다.The index of the row to delete.

예제

다음 예제에서는 Delete 행을 삭제 하는 방법입니다.The following example uses the Delete method to delete a row.

Private Sub DeleteRow(view As DataView, val As String)
    ' Find the given value in the DataView and delete the row.
    Dim i As Integer = view.Find(val)

    If i = -1 Then
        ' The value wasn'table found
        Console.WriteLine("Value not found in primary key column")
        Exit Sub
    Else
        view.Delete(i)
    End If
End Sub

설명

삭제 한 후는 DataRow, 상태 변경 DataViewRowState.Deleted합니다.After deleting a DataRow, its state changes to DataViewRowState.Deleted. 롤백할 수 있습니다 삭제를 호출 하 여 RejectChangesDataTable합니다.You can roll back the deletion by calling RejectChanges on the DataTable.

적용 대상

추가 정보