NumericTextBox control

Hi,
I am trying to use the NumericTextBox control and want to know if I can format it to only show integers (ie, I need to remove the .00 from the display)? And on that note can I change the number of decimal places after the . character?

Thanks.
David.

2 Replies

VA Valli Syncfusion Team April 2, 2007 07:33 AM UTC

Hi David,

'DecimalDigits' property of the NumericTextBox control helps you to achieve your requirement.

1. The below code snippet formats the NumericTextBox to display only integers.

this.NumericTextBox1.DecimalDigits = 0;

2. You can also change the number of digits to be displayed after the decimal point.

For e.g.:

this.NumericTextBox1.DecimalDigits = n;

Where 'n' refers the number of digits that are displayed after the decimal point.

The below code snippet displays '3' digit after the decimal point.

this.NumericTextBox1.DecimalDigits = 3;

Please let us know if this helps you.

Thanks for using Syncfusion products.

Regards,
Valli


DA David A. Gonzales April 2, 2007 04:39 PM UTC

Boy, I must of missed that property. That was way too easy. Thanks, just what I needed.

David.

Loader.
Up arrow icon