RadioButtonGroup Field Control

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

The RadioButtonGroup Field Control displays a list of radiobuttons for selecting an option from a single-selection Choice field.

RadioButtonGroup Field Control

Details

When the underlying Choice Field is configured to allow extra value an extra textbox is rendered next to the radiobuttongroup control.

Supported Field types

Properties

  • SelectedValueType (optional): Sets the display type of the selected options in Browse mode. Possible values are Value and Text, default is Text.

Example:

   <sn:RadioButtonGroup ID="RadioButtonGroup1" runat="server" FieldName="Style" SelectedValueType="Value" />


For a complete list of common Field Control properties see common Field Control properties.

Templates

The RadioButtonGroup Field Control renders a Label control in Browse mode and a RadioButtonList accompanied with a TextBox - the latter for an optional extra value - in Edit mode.

Browse view template

<%@  Language="C#" %>
<asp:Label ID="InnerControl" runat="server" />

Edit view template

<%@  Language="C#" %>
<asp:RadioButtonList CssClass="sn-ctrl sn-ctrl-radiogroup" ID="InnerControl" runat="server" />
<asp:TextBox CssClass="sn-ctrl sn-ctrl-text sn-ctrl-extravalue" ID="ExtraTextBox" runat="server" />

Example/Tutorials

Simple example

   <sn:RadioButtonGroup ID="RadioButtonGroup1" runat="server" FieldName="Style" />

Templated example

   <sn:RadioButtonGroup ID="RadioButtonGroup1" runat="server" FieldName="Style">
      <EditTemplate>
         <asp:RadioButtonList ID="InnerControl" runat="server" />
         <asp:TextBox ID="ExtraTextBox" runat="server" />
      </EditTemplate>
   </sn:DropDown>

Related links

References