CurrencyTextBox formatting decimal places

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


1 Reply

AA Arun A Syncfusion Team 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.



Loader.
Up arrow icon