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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CurrencyTextBox formatting decimal places

Thread ID:

Created:

Updated:

Platform:

Replies:

101593 Nov 4,2011 07:17 PM UTC Nov 9,2011 06:59 AM UTC Windows Forms 1
loading
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?

Thanks,
Mark


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,

http://www.syncfusion.com/downloads/Support/DirectTrac/87072/CurrencyTextBoxSample-14195169.zip

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

We are glad to help you out.

Regards,
Arun A.



CONFIRMATION

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.

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

;