SPMobileBaseChoiceField.DisplaySelectionNumberLimit Property

Gets the maximum number of selected choices in a choice field that is shown in a list view or on an item Display page.

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public ReadOnly Property DisplaySelectionNumberLimit As Integer
    Get
'Usage
Dim instance As SPMobileBaseChoiceField
Dim value As Integer

value = instance.DisplaySelectionNumberLimit
public int DisplaySelectionNumberLimit { get; }

Property Value

Type: System.Int32
A Int32 that represents the maximum number of selected choices, set in the mobile web.config file, that the field presents to users on an item display page.

Remarks

To use this property, you must insert an add element into the mobile web.config file (see example) and then override DisplaySelectionNumberLimitKey to return the value that you assign to the key attribute of the element.

Examples

The following is an example of an add element that sets a limit on the number of options a field class derived from SPMobileBaseChoiceField can have.

<add key="mobile_My_Custom_choicefielddisplayselectionnumberlimit" 
value="10"  />

See Also

Reference

SPMobileBaseChoiceField Class

SPMobileBaseChoiceField Members

Microsoft.SharePoint.MobileControls Namespace