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.
Syncfusion Feedback

leading zeros

Thread ID:

Created:

Updated:

Platform:

Replies:

118847 Apr 15,2015 12:02 PM UTC Apr 16,2015 07:10 AM UTC WPF 1
loading
Tags: DoubleTextBox
mzc
Asked On April 15, 2015 12:02 PM UTC

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

Victory Jessie Selvam D [Syncfusion]
Replied On 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

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.

Warning Icon 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.Close Icon

;