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.

NumericTextBox control

Thread ID:

Created:

Updated:

Platform:

Replies:

58917 Mar 30,2007 02:13 PM Apr 2,2007 12:39 PM ASP.NET Web Forms (Classic) 2
loading
Tags: Tools
David A. Gonzales
Asked On March 30, 2007 02:13 PM

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.

Valli [Syncfusion]
Replied On April 2, 2007 03:33 AM

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

David A. Gonzales
Replied On April 2, 2007 12:39 PM

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

David.

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.

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.

;