MaximumNumberDecimalDigits doesn't work when setting with binding

Hello,

    I want to set MaximumNumberDecimalDigits through binding because each page with SfNumerixTextBox has different digits but it only works, when I set it manually like MaximumNumberDecimalDigits = "4".

Here is sample
https://github.com/Kalyxt/test_SfNumericTextBox.git

Steps to reproduce:
- Value is 0.0125
- MaximumNumberDecimalDigits is 4
- When you open page with SfNumerixTextBox the value is 0.0100 (should be 0.0125)

Screenshot_1654168759.png
Screenshot_1654168765.png


3 Replies 1 reply marked as answer

VR Vignesh Ramesh Syncfusion Team June 3, 2022 05:47 PM UTC

We have checked the provided sample and in it, the Value property has been set first. So, at that time, the default value for MaximumNumberDecimalDigits is 2. So, the provided value (0.0125) has been converted with 2 decimal digits (0.01) and then the MaximumNumberDecimalDigits has been updated. So, the validated value has been converted to 4 digits (0.0100). You can overcome this by setting the Value after the MaximumNumberDecimalDigits property as shown in the below snippet.


[XAML]

<syncfusion:SfNumericTextBox MaximumNumberDecimalDigits="{Binding MaximumNumberDecimalDigits}"

                             Value="{Binding Value}"

                              />


We have also updated the provided sample too. Please find the updated sample from the below attachment.


Attachment: test_SfNumericTextBox_8dc68a23.zip

Marked as answer

DZ David Ziak June 6, 2022 07:20 AM UTC

Thank you, it wasn't so obvious to me as, if you set it like MaximumNumberDecimalDigits = "4" after value, it works too.






ET Eswaran Thirugnanasambandam Syncfusion Team June 7, 2022 07:57 AM UTC

We are glad that our solution has resolved your issue. Please get back to us if you need any further assistance.


Loader.
Up arrow icon