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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CurrencyTextBox formatting decimal places

Thread ID:





101593 Nov 4,2011 07:17 PM UTC Nov 9,2011 06:59 AM UTC WinForms 1
Tags: Tools
Administrator [Syncfusion]
Asked On November 4, 2011 07:17 PM UTC

I'd like to be able to format a currency value using the CurrencyTextBox to at least 2 decimal places, but up to 8 (or maybe some other arbitrary number) and trim off the unnecessary 0's.

For example:
5.00000000 would be formatted as $5.00
5.00225000 would be formatted as $5.00225
5.55000000 would be formatted as $5.55
5.12345678 would be formatted as $5.12345678

Is there any way to do this? Override the Format and Parse methods, perhaps?


Arun A [Syncfusion]
Replied On November 9, 2011 06:59 AM UTC

Hi Mark,

Thanks for your interest in Syncfusion Products.

Your requirement can be achieved by using the following codes snippet,

this.currencyTextBox1.RemoveDecimalZeros = true;

I have included the sample as per your requirements as follows,


Please have a look on the above sample and let us know if you need further assistance.

We are glad to help you out.

Arun A.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon