It seems to me that this doesn''t solve the problem. If I want to input the number "1.04", then I cannot because the 0 will continually get truncated due to the formatting.
Has anyone solved this issue?
Thanks,
Brian
>Hi Mark,
>
>You could derive from the DoubleTextBox class and override the ApplyFormatting method as shown below. This would prevent zeros from being padded to the DoubleValue and 2.22 would show up as 2.22 and not 2.2200 (even if the NumberDecimalDigits property is set to 4). However, the only way to have unlimited number of decimal digits is to specify a large value to the NumberDecimalDigits property.
>
>public class CustomDoubleTextBox : DoubleTextBox
> {
>
> public CustomDoubleTextBox () : base()
> {
>
> }
>
> protected override string ApplyFormatting(string rawValue)
> {
> string returnString;
> double dValue = 0;
>
> if(rawValue != null && rawValue != String.Empty)
> dValue = Convert.ToDouble(rawValue);
>
> returnString = dValue.ToString();
>
> return returnString;
> }
> }
>
>The
complete sample that illustrates this workaround is attached here. Please refer to it and let me know if this meets your requirements. Thanks for your interest in Syncfusion products.
>
>Regards,
>Guru Patwal
>Syncfusion,Inc.
>