I'm using an UltraNumericEditor to display a read-only percentage value. I want it to display negative values, and have at least 2 decimal places displayed at all times, and possibly four (if there are 4 decimal places).
So far, I have set the following properties
FormatString: ##,##0.00##%
MaskInput: -nn.nnnn
NumericType: Double
ReadOnly: True
I realise the MaskInput is only used during input, and as this is read only, may not be that relevant. But if the user clicks in this field, I want it to continue to display the decimal places.
For displaying only, these properties work fine. If the value is 34.112233, it will display 34.1122%. This is exactly what I want.
When the user clicks in the control, it is a different matter. I lose the decimal places - it goes to just 34. What should the MaskInput be in this situation? I have tried some of the standard MaskInputs, and they dont seem to do the trick either.
Hello Gabriel,
I try to reproduce the issue using version 13.1.20131.2089 and everything seems to works properly. Let me know if you have any further questions.
Regards
It is a bug with NumericType.Double, try NumericType.Decimal instead.
The bug is that the MaskInput is not correctly applied when the NumericType is Double.
My Infragistics version is 13.1.
Thank you,
What version of the control are you using?
Can you post a small sample project demonstrating this behavior.
Putting the control into edit mode should not cause you to lose (or alter) the value. My guess is that it's the percent sign that's messing things up. This is a known bug that was fixed a long time ago, though. So if this is still happening in a recent version of the controls, it might be a bug.
Hello fweeee,
You could try setting the 'NumericType' to 'Double' before setting the 'MaskInput'. I guess that your scenario does not work as you expect because the 'NumericType' is set to 'Integer' when you are trying to set the InputMask and after that you are setting it to Double.
Please do not hesitate to contact us if you need any additional assistance.