.NET Framework Class Library DataView..::.AllowDelete Property Sets or gets a value that indicates whether deletes are allowed.
Namespace:
System.Data
Assembly:
System.Data (in System.Data.dll)

Syntax
Public Property AllowDelete As Boolean
Get
Set
public bool AllowDelete { get; set; }
public:
property bool AllowDelete {
bool get ();
void set (bool value);
}
member AllowDelete : bool with get, set

Examples
The following example checks the AllowDelete property before deleting a DataRow from a DataView.
Private Sub CheckAllowDelete(rowToDelete As DataRow)
Dim view As DataView = New DataView(DataSet1.Tables("Suppliers"))
If view.AllowDelete Then
rowToDelete.Delete()
End If
End Sub
private void CheckAllowDelete(DataRow rowToDelete)
{
DataView view = new DataView(DataSet1.Tables["Suppliers"]);
if (view.AllowDelete)
rowToDelete.Delete();
}

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Biblioteca de clases de .NET Framework DataView..::.AllowDelete (Propiedad) Establece u obtiene un valor que indica si se permite eliminar.
Espacio de nombres:
System.Data
Ensamblado:
System.Data (en System.Data.dll)

Sintaxis
Public Property AllowDelete As Boolean
Get
Set
public bool AllowDelete { get; set; }
public:
property bool AllowDelete {
bool get ();
void set (bool value);
}
member AllowDelete : bool with get, set
Valor de propiedadTipo: System..::.Boolean
true si se permiten eliminaciones; en caso contrario, false.

Ejemplos
En el ejemplo siguiente se comprueba la propiedad AllowDelete antes de eliminar un DataRow de un DataView.
Private Sub CheckAllowDelete(rowToDelete As DataRow)
Dim view As DataView = New DataView(DataSet1.Tables("Suppliers"))
If view.AllowDelete Then
rowToDelete.Delete()
End If
End Sub
private void CheckAllowDelete(DataRow rowToDelete)
{
DataView view = new DataView(DataSet1.Tables["Suppliers"]);
if (view.AllowDelete)
rowToDelete.Delete();
}

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Vea también
|