Hi,
how can I setup EjsNumericTextBox so that only integer numbers are possible to enter? I've tried:
Here, when I type "10.6789", number gets displayed as "11", but when I click again on the input, value is "10.6789".
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="0" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="0" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=0 Format="n0"></EjsNumericTextBox>
Here, when I type "10.6789", number gets displayed as "10.679" and when I click on the input, value is "10.6789".
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="0" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="0" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=0 Format="n"></EjsNumericTextBox>
Here I tested Decimals=1 to see how it behaves. It seems that with Decimals=1, I can only type 1 decimal as expected.
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="1" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="1" Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=1 Format="n0"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType="true" Decimals="1" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals="1" Format="n"></EjsNumericTextBox>
<EjsNumericTextBox TValue="int?" Value="10" ValidateDecimalOnType=true Decimals=1 Format="n"></EjsNumericTextBox>
So it seems that Decimals=0 is problematic, as it still allows me to type decimal point and after that as many decimals as I wish.
Am I doing something wrong?
thanks