We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

rounding issue

sometimes, but not always...
the control numeric textbox applied rounding by itself and should not, as an ex:  I've got 2 forms,  a Fly Out form(another window) and a main window(main editor) both have the same control and same style is applied on both controls, the user has to specified an amount on that FlyOut form, the amount entered is 5.66, when lost focus the amount is still good, got the right amount $5.66, click OK on that form, still have the right amount 5.66 on the object returned from that FlyOut Form, but once returning and be back on  the main window with that same object, sometime the control on the main windows round it to 6 but it should not 
why it behave not the same way?  in the object I have the right amount 5.66 but what we got displayed on the control on main window is 6, so  if I lost focus on that field it will change the value to 6 to replace the 5.66 on my object, seems that the control on the main windows sometime is losing the styling and applied a rounding by itself why?

all of this, just saying that, I don't have the rounding issue If I've entered the amount directly on the control, I have this issue only by binding (once the object values are being update by another form and be back on the main form with that object with same type of control and same style be applied on controls)..hope this help and not losing anybody :)

here the style I've use on both Forms

How can I setup the control to never round the value?


    <Style x:Name="SfNumericTextBoxCurrencyStyle" TargetType="SyncfusionInput:SfNumericTextBox">
        <Setter Property="RequestedTheme" Value="Light" />
        <Setter Property="FontSize" Value="17" />
        <Setter Property="Padding" Value="0,0,5,0"/>
        <Setter Property="FormatString" Value="C2"/>
        <Setter Property="TextAlignment" Value="Right" />
        <Setter Property="MaximumNumberDecimalDigits" Value="2"/>
    </Style>

thanks!

1 Reply

DR Durga Rajan Syncfusion Team May 25, 2016 11:23 AM UTC

Hi Markten,

We were unable to reproduce the reported issue in SfNumericTextBox and we have attached the sample in which we have tried to reproduce the issue. Please have look at the sample and if the issue still persists, please update the issue reproducible or modified sample with video. This would help us to proceed further.

Sample:
NumericTextBoxSample

Video: 
124207_SfNumericTextBox


Regards,
Durga S.

Loader.
Live Chat Icon For mobile
Up arrow icon