How do I configure on UltraNumericEditor to have leading zeros.
For example: when I configure Mask Input = {double:6.4} if user type 123.45 the value of ultranumericeditor will show like that 000123.4500
Can I configure UltraNumericEditor like above? Because I have many many forms use this control so I don't want to code on every form :(
Any help will be appreciate, :)
Thanks,
Dan
Ooops, I already found a way to do like that :(
First, I set the PromptChar from _ to 0
Second, I set "Mask Display Mode" to Include Both
That's ok :)
:(, I still have problem with the format of UltraNumericEditor.
If my user want to show a negative sign at the left of the number, then I don't know how to format.
For example: when user type -1234.56, UltraNumericEditor will show: -001234.5600 not like that 00-1234.5600
Thanks a lot for any helping :)
Hi Dan,
I'm not sure what you are asking. What do you want to show in this case?
Are you saying that you only want leading zeroes when the number it not negative? Or that you want the negative to appear after a 0 like "0-1234.5600"?
I don't think either of those are possible with the current functionality of UltraNumericEditor.
Hi Mike,
In this case, I want the negative to appear at left of number, not after a zero.
I want it appear like that -001234.5600 (at present, the negative always appear after a zero like "00-1234.5600"
That mean, when user type the minus, the UltraNumeric will appear the minus sign at the left (-001234.5600)
Can I configure the UltraNumericEditor to do like that?
Sorry for my bad english, I hope you to understand what I want in this case.
Thanks a lot
Try this:
this.ultraNumericEditor1.NumericType = Infragistics.Win.UltraWinEditors.NumericType.Double; this.ultraNumericEditor1.FormatString = "000000.00"; this.ultraNumericEditor1.MaskInput = "-nnnnnn.nnnn";
this.ultraNumericEditor1.NumericType = Infragistics.Win.UltraWinEditors.NumericType.Double;
this.ultraNumericEditor1.FormatString = "000000.00";
this.ultraNumericEditor1.MaskInput = "-nnnnnn.nnnn";
Thanks a lot for your suggestion. But I already tried it before and it's not my expectation :(
With your suggestion, a negative sign will show at left of prompt char when UltraNumericEditor is in View Mode (lost focus).
But in my case, I want a negative sign will show at left of prompt char in Edit Mode. That mean when user type a negative sign, it will appear at left of prompt char immediately
I hope it will be clear for anyone who wants to help me.
Thanks a lot for any help
That's a bad news :(
Btw, thanks you a lot, Mike
I don't see any way to do that.