Hello,
I have a problem with the AspxSpinEdit control version 14.2.5.
In our application, we enable customers to define the display format for Currency fields. We have been using Thread.CurrentThread.CurrentCulture and setting these properties:
- NumberFormat.CurrencyDecimalDigits
- NumberFormat.CurrencyPositivePattern
- NumberFormat.CurrencyNegativePattern
This works fine unless NumberFormat.CurrencyNegativePattern has values of 5, 7, 11 and 13. Any of these values cause the following issue:
Currency values have the expected format when rendered for the first time. However, the currency field display becomes inconsistent as the field gets and then loses focus.
For example, if the field's value is "$ 12.5-", it becomes "-12.5" on focus, and "12.5" on losing focus. The original format is never restored.
After some research I found this piece of JavaScript code:
switch(__aspxCultureInfo.currNegPattern) {
case 0:
bag.push("(", __aspxCultureInfo.currency);
break;
case 1:
bag.push("-", __aspxCultureInfo.currency);
break;
case 2:
bag.push(__aspxCultureInfo.currency, "-");
break;
case 3:
bag.push(__aspxCultureInfo.currency);
break;
case 5:
case 8:
bag.push("-");
break;
case 9:
bag.push("-", __aspxCultureInfo.currency, " ");
break;
case 12:
bag.push(__aspxCultureInfo.currency, " -");
break;
case 14:
bag.push("(", __aspxCultureInfo.currency, " ");
break;
case 15:
bag.push("(");
break;
}
switch(__aspxCultureInfo.currNegPattern) {
case 0:
case 14:
bag.push(")");
break;
case 3:
bag.push("-");
break;
case 5:
bag.push(__aspxCultureInfo.currency);
break;
case 8:
bag.push(" ", __aspxCultureInfo.currency);
break;
case 10:
bag.push(" ", __aspxCultureInfo.currency, "-");
break;
case 15:
bag.push(" ", __aspxCultureInfo.currency, ")");
break;
}
}
As far as I can tell, formats 5, 7, 11 and 13 are not supported. If so, is there a reason for this? Will you provide any advice or guidance on what we can do to have these formats in our application?
Regards,
Vladimir Vinogradsky
Hello Vladimir,
Thank you for contacting us. I see the problem. I will forward this issue to our R&D team. Our developers will continue working on this problem, and we will keep you informed of any progress.