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

RemoveDecimalZeros of CurrencyTextBox does not work correctly


I am using Syncfusion Essential Studio with WinForm. I have a query about the RemoveDecimalZeros property of CurrencyTextBox control.

If my understanding is correct, RemoveDecimalZeros should remove all the trailing zeros after the decimal dot, but allow non-trailing zeros.

However, after set RemoveDecimalZeros =true I can not input text "1.103". Basically, if "0" is input right after the decimal dot ("."), it will be remembered and displayed when a non-zero digit has been input. For example, 1.003 can be entered, but CurrencyTextBox will only display "1" before I input the last "3". 

On the other hand, if "0" is input after decimal dot, but not right after the dot, it will be completely ignored. CurrencyTextBox seems to treat it as non-necessary zero and ignore the input. Therefore "1.103" will become "1.13".

Is this bug of CurrencyTextBox or my understanding about RemoveDecimalZeros is incorrect? How should I setup my CurrencyTextBox to remove all the trailing zeros but allow "1.103" kind of input?



3 Replies

PA Paul Anderson S Syncfusion Team August 1, 2013 07:12 AM UTC

Hi Xinchao,

Thanks for your interest in syncfusion products.

In CurrencyTextBox when the RemovedecimalZeros is set to true after the decimal point it will not allow to type zero. When the property is true the behaviour is Zero should not be teh ending value . So when typing a zero it consider as a last digit and removes it. To achieve your requirement of typing 1.103, first enter 1.13 and then place the cursor in-betweeen '1' and '3' and then type '0'.

Please let us know if you have any concerns.

Paul Anderson S

XI Xinchao August 2, 2013 07:20 AM UTC

Is this behavior changed/fixed in later versions? 

PA Paul Anderson S Syncfusion Team August 5, 2013 04:11 AM UTC

Hi Xinchao,

Thanks for the update.

We would like to let you know that the reported behaviour with CurrencyTextBox "RemoveDecimalZeros" is the intended behaviour. We have the same behaviour in our later versions also.

Please let us know if you have any concerns.

Paul Anderson S

Live Chat Icon For mobile
Up arrow icon