DataView.AllowDelete Propiedad

Definición

Obtiene o establece un valor que indica si se permiten las eliminaciones.

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

Valor de propiedad

true si se permiten las eliminaciones; en caso contrario, false.

Atributos

Ejemplos

En el ejemplo siguiente se comprueba la AllowDelete propiedad antes de eliminar de DataRow .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

Se aplica a

Consulte también