Share via


SPFieldChoice Class

Represents a choice field.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPField
    Microsoft.SharePoint.SPFieldMultiChoice
      Microsoft.SharePoint.SPFieldChoice
        Microsoft.SharePoint.Applications.GroupBoard.SPFieldContactInformation
        Microsoft.SharePoint.Applications.GroupBoard.SPFieldWhereabout
        Microsoft.SharePoint.SPFieldModStat
        Microsoft.SharePoint.SPFieldWorkflowStatus

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

Syntax

'Declaration
<ClientCallableTypeAttribute(Name := "FieldChoice", ServerTypeId := "a0b73943-fabc-47d3-b2c8-ec41b1216b1d")> _
<SubsetCallableTypeAttribute> _
Public Class SPFieldChoice _
    Inherits SPFieldMultiChoice
'Usage
Dim instance As SPFieldChoice
[ClientCallableTypeAttribute(Name = "FieldChoice", ServerTypeId = "a0b73943-fabc-47d3-b2c8-ec41b1216b1d")]
[SubsetCallableTypeAttribute]
public class SPFieldChoice : SPFieldMultiChoice

Remarks

If you set properties of the SPFieldChoice class you must call the Update method for changes to take effect in the database.

An SPFieldChoice object can be rendered through the BaseChoiceField server control.

The SPFieldChoice class corresponds to the Choice data type that is specified through the Type attribute of the Field element.

Notes to Inheritors

In SharePoint Foundation, columns based on custom field types are read-only in Datasheet view.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPFieldChoice Members

Microsoft.SharePoint Namespace