DataView.AllowDelete Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se são permitidas eliminações.
public:
property bool AllowDelete { bool get(); void set(bool value); };
[System.Data.DataSysDescription("DataViewAllowDeleteDescr")]
public bool AllowDelete { get; set; }
public bool AllowDelete { get; set; }
[<System.Data.DataSysDescription("DataViewAllowDeleteDescr")>]
member this.AllowDelete : bool with get, set
member this.AllowDelete : bool with get, set
Public Property AllowDelete As Boolean
Valor de Propriedade
true, se forem permitidas eliminações; caso contrário, false.
- Atributos
Exemplos
O exemplo seguinte verifica a AllowDelete propriedade antes de eliminar um DataRow de um 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