WholeNumber Field Control

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

Overview

This Field Control is responsible for displaying or editing whole numbers with no decimal values.

WholeNumber Field Control in edit mode

Details

With Number Field Controls any kind of numeric data can be displayed and edited.

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 WholeNumber Field Control is a simple Field Control that renders a single TextBox. In Browse mode simply the value of the Field is rendered.

Browse view template

<%@  Language="C#" EnableViewState="false" %>
<%# DataBinder.Eval(Container, "Data") %><asp:Label ID="LabelForPercentage" runat="server" Visible="false" />

Edit view template

<%@  Language="C#" %>
<asp:TextBox CssClass="sn-ctrl sn-ctrl-number" ID="InnerWholeNumber" runat="server"></asp:TextBox><asp:Label ID="LabelForPercentage" runat="server" Visible="false" />

Examples

Simple example

   <sn:WholeNumber ID="WholeNumber1" runat="server" FieldName="Number1" />

Templated example

   <sn:WholeNumber ID="WholeNumber1" runat="server" FieldName="Number1">
      <EditTemplate>
         <asp:TextBox ID="InnerControl" runat="server"></asp:TextBox>
      </EditTemplate>
   </sn:WholeNumber>

Related links

References