Currency Field Control
From Sense/Net Wiki
- 100%
- 6.0
- Enterprise
- Community
Planned
Overview
This Field Control is used for storing a number value in a specified currency.
Details
In a Currency Field Control number data can be displayed and edited as currency-value. Currency type is set by the adjusted culture on the node.
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 Currency Field Control is a simple Field Control that renders a single TextBox. In Browse mode the value of the Field is rendered thousand separated, and with the type of currency.
Browse view template
<%@ Language="C#" EnableViewState="false" %> <%# ((SenseNet.Portal.UI.Controls.FieldControl)Container).Field.GetFormattedValue() %>
Edit view template
Has no specific Edit Template, it uses the Number Field's as parent element's Template .
<%@ Language="C#" %> <asp:TextBox ID="InnerControl" runat="server" CssClass="sn-ctrl sn-ctrl-number"></asp:TextBox>
Examples
Simple example
<sn:Currency ID="Currency1" runat="server" FieldName="Value1" />Templated example
<sn:Currency ID="Currency1" runat="server" FieldName="Value1"> <EditTemplate> <asp:TextBox ID="InnerControl" runat="server"></asp:TextBox> </EditTemplate> </sn:Currency>