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
close icon

leading zeros

Hello Syncfusion,
I was trying to lookup how can I setup format for numbers in DoubleTextBox in your Dashboard example applications. I was not able to find any example of DoubleTextBox with specified leading zeros. Only NumberDecimalDigits.

Example:
DoubleTextBox.Value = 123.45 And we would like to display it as 00000123.4500


Our Syncfusion library has version 12.2400.0.36

Thanks,
MZC

1 Reply

VJ Victory Jessie Selvam D Syncfusion Team April 16, 2015 07:10 AM UTC

Hi MZC,

Thank you for using Syncfusion products.

Only when converted to string representation we can have leading zeros. Double value cannot have leading zeros and DoubleTextBox.Value property is of type double?(nullable). So we cannot display zeros before number even if the Text is formatted(double.Parse method will remove it). Kindly refer the following msdn forum link,

https://social.msdn.microsoft.com/Forums/vstudio/en-US/dad3330a-0d8d-4815-bbc3-b6f05d6b8b05/how-to-add-zero-to-an-integer-value-from-left-like-999-to-0999?forum=csharpgeneral

Please let us know if you need further assistance on this.

Regards,
Jessie

Loader.
Live Chat Icon For mobile
Up arrow icon