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. Image for the cookie policy date

Numeric TextBoxes

Is there a way to apply a numeric format string to the value in the TextBox? For example I want to Format the DoubleValue in a DoubleTextBox with the numeric format string "#,##0.####". I have set the Double Text box to 4 decimal places which is fine but (not surprisingly some might say) it displays the double 0.0 as "0.0000", I only want the 4dp precision as and when the double requires it.

1 Reply

AD Administrator Syncfusion Team February 10, 2005 03:39 PM

Hi Mark, The DoubleTextBox class uses a NumberFormatInfo internally. Since NumberFormatInfo works like you describe, so does DoubleTextBox. However, it should be possible to dynamically update NumberDecimalDigits to affect how the number is displayed. Regards, Gregory Austin Syncfusion, Inc.

Live Chat Icon For mobile
Up arrow icon