Boolean Field Control
From Sense/Net Wiki
- 100%
- 6.0
- Enterprise
- Community
Planned
Overview
The Boolean Field Control is a Field Control that handles Boolean Fields and provides a checkbox to modify a value to be true or false.
Details
With the Boolean field control boolean data can be displayed or edited. The value can be displayed with a CheckBox or as a simple text. As it is boolean the value of it can only be true or false.
Supported Field types
Properties
There are no specific properties defined for this Field Control besides the common properties.
For a complete list of common Field Control properties see common Field Control properties.
Templates
The Boolean Field Control is simple Field Control that renders a single CheckBox. In Browse mode simply the value of the Field is rendered.
Browse view template
<%@ Language="C#" %> <%# DataBinder.Eval(Container, "Data") %>
Edit view template
<%@ Language="C#" %> <asp:CheckBox CssClass="sn-ctrl sn-checkbox" ID="InnerCheckBox" runat="server" />
Example/Tutorials
Simple example
<sn:Boolean ID="Boolean2" runat="server" FieldName="Hidden"/>
Templated example
<sn:Boolean ID="Boolean2" runat="server" FieldName="Hidden"> <EditTemplate> <asp:CheckBox ID="InnerCheckBox" runat="server" /> </EditTemplate> </sn:Boolean>
