BooleanField.Value Property

Gets or sets the status of the child check box of the BooleanField control.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Overrides Property Value As Object
    Get
    Set
'Usage
Dim instance As BooleanField
Dim value As Object

value = instance.Value

instance.Value = value
public override Object Value { get; set; }

Property Value

Type: System.Object
A Boolean (that has been cast to Object) that represents the selected or cleared state of the child check box of the BooleanField control.

Remarks

In the default implementation, Value is true when the check box is selected and false when it is not.

You can set Value with true or false. To keep the UI of the control consistent with the actual value of the field, set Value to the value of ItemFieldValue, which is the value of the field for the SPField object that has the BooleanField control as its FieldRenderingControl property. (The default OnLoad method will do this.)

Whenever your code sets Value, it should immediately call UpdateFieldValueInItem to update ItemFieldValue. This ensures that the appropriate value-changed event occurs.

See Also

Reference

BooleanField Class

BooleanField Members

Microsoft.SharePoint.WebControls Namespace