Bagikan melalui


DataView.AllowDelete Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah penghapusan diizinkan.

public:
 property bool AllowDelete { bool get(); void set(bool value); };
public bool AllowDelete { get; set; }
[System.Data.DataSysDescription("DataViewAllowDeleteDescr")]
public bool AllowDelete { get; set; }
member this.AllowDelete : bool with get, set
[<System.Data.DataSysDescription("DataViewAllowDeleteDescr")>]
member this.AllowDelete : bool with get, set
Public Property AllowDelete As Boolean

Nilai Properti

true, jika penghapusan diizinkan; jika tidak, false.

Atribut

Contoh

Contoh berikut memeriksa AllowDelete properti sebelum menghapus DataRow dari DataView.

private void CheckAllowDelete(DataRow rowToDelete)
{
    DataView view = new DataView(DataSet1.Tables["Suppliers"]);
    if (view.AllowDelete)
        rowToDelete.Delete();
}
Private Sub CheckAllowDelete(rowToDelete As DataRow)
    Dim view As New DataView(DataSet1.Tables("Suppliers"))
    If view.AllowDelete Then
    rowToDelete.Delete()
    End If
End Sub

Berlaku untuk

Lihat juga