Auto rounds the data entered to 2 decimal on Enter key places even though the FormatString says 5 decimal places

I am using SFNumericTextbox in my UWP application. In this when I enter say "0.1555" and press Enter key it rounds it off to 0.16000. My formatstring is set as "0.00000". This is happening only on Enter key click, when I type the same value and using mouse click outside then the value remains as "0.1555".

Can anyone help me out with a solution. I want to stop this default rounding on Enter key click.


13 Replies 1 reply marked as answer

ET Eswaran Thirugnanasambandam Syncfusion Team May 10, 2021 01:00 PM UTC

Hi Jayanth Nag, 
 
Thanks for contacting Syncfusion support.  
 
We checked the reported issue “The value gets round when clicking the enter button” and we are unable to reproduce the issue, when clicking the enter button. 
 
We have prepared a simple sample and a video to show that SfNumericTextBox format not getting change, when clicking the enter button. Please get the sample and video from the below links.  
 
 
 
If you still face the same issue, could you please share more details, if we missed any other scenario or revert us by modifying the attached sample based on your application scenario, this will help us to provide you a better solution at the earliest. 
 
Regards, 
Eswaran 



JN Jayanth Nag replied to Eswaran Thirugnanasambandam May 11, 2021 08:48 AM UTC

Hi Jayanth Nag, 
 
Thanks for contacting Syncfusion support.  
 
We checked the reported issue “The value gets round when clicking the enter button” and we are unable to reproduce the issue, when clicking the enter button. 
 
We have prepared a simple sample and a video to show that SfNumericTextBox format not getting change, when clicking the enter button. Please get the sample and video from the below links.  
 
 
 
If you still face the same issue, could you please share more details, if we missed any other scenario or revert us by modifying the attached sample based on your application scenario, this will help us to provide you a better solution at the earliest. 
 
Regards, 
Eswaran 


Eswaran, 

Thanks for your response. Yes the sample you have given is working fine and I found that adding the below in XAML starts the behavior I had mentioned. You can give it a try. 

BlockCharactersOnTextInput="False"

I needed this to allow decimal point input. I am using control version 18.2.0.56

My control is as given below in XAML page
             <  editors:SfNumericTextBox 
                    x:Name="txtHeight"
                    FormatString="0.00000"
                    Value="{Binding HeightValue, 
                    Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                    Style="{StaticResource TextBoxEntry}" 
                    GotFocus="GotFocus" 
                    AllowNull="True" 
                    BeforeTextChanging="Custom_BeforeTextChanging"
                    TextChanging="Custom_TextChanging"
                    KeyUp="Custom_KeyUpHandler"
                    ParsingMode="Decimal"/>

Let me know if you also see the issue now and is there a workaround for this?

Jayanth Nag


SS Sridevi Sivakumar Syncfusion Team May 13, 2021 10:17 AM UTC

Hi Jayanth Nag,

We can reproduce the issue and logged bug report for this “
SfNumericTextBox text not formatted correctly while pressing enter with BlockCharactersOnTextInput as false. The fix will be included in our Weekly NuGet release which is scheduled to be rolled out on 25th May 2021. We appreciate your patience until then.

You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


https://www.syncfusion.com/feedback/25308/sfnumerictextbox-text-not-formatted-correctly-while-pressing-enter-with

And for your requirement “allow decimal point”, no need to set 
BlockCharactersOnTextInput this property. You can use decimal point without this property also. So, as of now please remove this property and use our SfNumerictextBox for correct format.

Regards,
Sridevi S.
 


Marked as answer

JN Jayanth Nag replied to Sridevi Sivakumar May 14, 2021 05:01 AM UTC

Hi Jayanth Nag,

We can reproduce the issue and logged bug report for this “
SfNumericTextBox text not formatted correctly while pressing enter with BlockCharactersOnTextInput as false. The fix will be included in our Weekly NuGet release which is scheduled to be rolled out on 25th May 2021. We appreciate your patience until then.

You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


https://www.syncfusion.com/feedback/25308/sfnumerictextbox-text-not-formatted-correctly-while-pressing-enter-with

And for your requirement “allow decimal point”, no need to set 
BlockCharactersOnTextInput this property. You can use decimal point without this property also. So, as of now please remove this property and use our SfNumerictextBox for correct format.

Regards,
Sridevi S.
 


Sridevi,
Thank you for your reply, yes I have now upgraded to the latest version and then as you mentioned have removed "BlockCharactersOnTextInput" and is now working as expected. Earlier version had issues without this option.
Thanking you
Jayanth Nag


ET Eswaran Thirugnanasambandam Syncfusion Team May 17, 2021 06:03 AM UTC

Hi Jayanth Nag, 
  
Thanks for your update.  
 
We are glad to hear that given suggestion works at your end. 
  
Please let us know if you need any further assistance. 
  
Regards, 
Eswaran 



JN Jayanth Nag replied to Eswaran Thirugnanasambandam May 20, 2021 05:25 AM UTC

Hi Jayanth Nag, 
  
Thanks for your update.  
 
We are glad to hear that given suggestion works at your end. 
  
Please let us know if you need any further assistance. 
  
Regards, 
Eswaran 


Eswaran,

Yes it worked fine for Enter key. Now I am facing another issue. 

As per the requirement when the control gets focus, the text inside that control should be fully selected. Now for example lets assume a sfNumericTextbox control has existing data 1.11300, now when this control gets focus the value inside that control is fully selected. I have new data "4.60542" which instead of typing it in, I will copy and paste it into that control, as the text inside that control is already selected, I just paste (ctrl + v) the selected data and now it automatically rounds it to "4.61".

Can you please check this and help me with a solution.

Thanking you

Jayanth Nag


SS Sridevi Sivakumar Syncfusion Team May 20, 2021 12:39 PM UTC

Hi Jayanth Nag,

We can able to reproduce "FormatString format is not applied while paste value in SfNumericTextBox" the issue and logged this bug in already provided feedback report. The fix will be included in our Weekly NuGet release which is scheduled to be rolled out on 25th May 2021.


You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.

https://www.syncfusion.com/feedback/25308

Regards, 
Sridevi S. 



SS Sridevi Sivakumar Syncfusion Team May 25, 2021 01:17 PM UTC

Hi Jayanth Nag,

We have fixed “FormatString format is not applied while paste value in SfNumericTextBox
issue and the fix is included in our weekly NuGet of May 25, 2021.

NuGet Version: 19.1.0.65

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Sridevi S. 



JN Jayanth Nag May 27, 2021 01:52 PM UTC

Sridevi,

Thank you for the update, I will update to the given version at my end.

Thanking you

Jayanth Nag


SS Sridevi Sivakumar Syncfusion Team May 28, 2021 06:03 AM UTC

Hi Jayanth Nag,

Thanks for your update.

We will wait until hear from you.

Regards,
Sridevi S. 



JN Jayanth Nag replied to Sridevi Sivakumar June 2, 2021 04:45 PM UTC

Hi Jayanth Nag,

We have fixed “FormatString format is not applied while paste value in SfNumericTextBox
issue and the fix is included in our weekly NuGet of May 25, 2021.

NuGet Version: 19.1.0.65

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Sridevi S. 


Sridevi,

As mentioned I updated my syncfusion package to the latest 19.1.0.66. The rounding during paste has got resolved, thank you for that. 

Now I see another issue, say for example I have a numeric textbox and when I enter a number the corresponding Get Set methods get triggered correctly, next I take some value and try pasting it into the numeric textbox the Get Set methods do not get triggered at all. I am assuming because the NumericTextBox.Text is getting set and not the NumericTextBox.Value, as when I check the value was null during paste operation.

Can you please look into this and share a solution for me.

Thanking you

Jayanth Nag


SS Sridevi Sivakumar Syncfusion Team June 3, 2021 11:51 AM UTC

Hi Jayanth Nag,

Thanks for sharing the information.

We checked the reported issue “Value property does not get update with paste text before entering new char” and confirmed as bug. We have logged a bug report for the reported issue, and you can keep track of the bug from the feedback portal below.

Link: https://www.syncfusion.com/feedback/25930

The provided feedback link is private, and you need to login to view this feedback.

We will fix this issue and the fix will be included in our next weekly NuGet release, which expected to be rolled out on June 8, 2021.

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.

Regards,
Sridevi S. 

 



SS Sridevi Sivakumar Syncfusion Team June 8, 2021 09:02 AM UTC

Hi Jayanth Nag,

We have fixed “Value property does not get update with paste text before entering new char” issue and the fix is included in our weekly NuGet of June 8, 2021.

NuGet Version: 19.1.0.67

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Sridevi S. 


Loader.
Up arrow icon