Aug 28, 2009, 1:41 PM
[CLOSED] DecimalPrecision does NOT work on a NumberField
Here is my xml source view:
<ext:Anchor>
<ext:NumberField
ID="txtRegularRate"
runat="server"
FieldLabel="Regular Rate"
Width="90"
ReadOnly="false"
AllowDecimals="true"
AllowNegative="false"
DecimalPrecision="2"
MaxValue="100000"
/>
</ext:Anchor>
<ext:Anchor>
<ext:NumberField
ID="txtVacationRate"
runat="server"
FieldLabel="Vacation Rate"
Width="90"
ReadOnly="false"
AllowDecimals="true"
DecimalPrecision="2"
MaxLength="7"
/>
</ext:Anchor>
and the code-behind looks like this, it always shows up as '15.2' or takes off the zero. These are currency values, and I am trying to specify precision.
Dim _strRegRate As String = Common.FormatCurrency(Convert.ToDouble(item.RegularRate))
Me.txtRegularRate.Text = _strRegRate
Me.txtVacationRate.Text = "15.20" 'Common.FormatCurrency(Convert.ToDouble(item.VacationRate))