.NET Framework Class Library DataView..::.AllowEdit Property Gets or sets a value that indicates whether edits are allowed.
Namespace:
System.Data
Assembly:
System.Data (in System.Data.dll)

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

Examples
The following example invokes the AllowEdit method before editing a row in a DataView.
Private Sub EditRow(view As DataView)
view.AllowEdit = True
view(0).BeginEdit
view(0)("FirstName") = "Mary"
view(0)("LastName") = "Jones"
view(0).EndEdit
End Sub
private void EditRow(DataView view)
{
view.AllowEdit = true;
view[0].BeginEdit();
view[0]["FirstName"] = "Mary";
view[0]["LastName"] = "Jones";
view[0].EndEdit();
}

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..::.AllowEdit (Propiedad) Obtiene o establece un valor que indica si se permite editar.
Espacio de nombres:
System.Data
Ensamblado:
System.Data (en System.Data.dll)

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

Ejemplos
En el ejemplo siguiente se invoca el método AllowEdit antes de editar una fila de un DataView.
Private Sub EditRow(view As DataView)
view.AllowEdit = True
view(0).BeginEdit
view(0)("FirstName") = "Mary"
view(0)("LastName") = "Jones"
view(0).EndEdit
End Sub
private void EditRow(DataView view)
{
view.AllowEdit = true;
view[0].BeginEdit();
view[0]["FirstName"] = "Mary";
view[0]["LastName"] = "Jones";
view[0].EndEdit();
}

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
|