Share via


SPField.AllowDeletion Property

Gets or sets a Boolean value that specifies whether the field can be deleted.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Property AllowDeletion As Nullable(Of Boolean)
    Get
    Set
'Usage
Dim instance As SPField
Dim value As Nullable(Of Boolean)

value = instance.AllowDeletion

instance.AllowDeletion = value
public Nullable<bool> AllowDeletion { get; set; }

Property Value

Type: System.Nullable<Boolean>
true if the field can be deleted; otherwise, false or a null reference (Nothing in Visual Basic). Always returns false when the field has an external data source.

Exceptions

Exception Condition
NotSupportedException

This property cannot be set if the field has an external data source.

See Also

Reference

SPField Class

SPField Members

Microsoft.SharePoint Namespace