Is there any way, I can enter decimal input in UltraNumericEditor and when focus is out to that control, the value will automatically be rounded?
Thanks,
The MaskInput property contros user input, so you could set it to something like: "-nn.nnnn"
This would allow the user to enter up to 4 digits after the decimal. Then set the FormatString, which controls the display when not in edit mode. So you could set it to something like: "##.##"
This would display only 2 digits when not in edit mode and it would round the value.
How can you display (in non-edit mode) only the decimals the user input? For example, if you have the masked edit setup to allow up to 9 decimal places but the user only enters 4, how can you do that using the FormatString property? For example:
Edit Mode: 0.931400000
Display Mode: 0.9314
What would the FormatString property be?
The formatting is done by the DotNet framework, so you will need to check out Microsoft documentation on numeric formats to see if there is a supported format that does what you want.
Standard Numeric Format Strings
Custom Numeric Format Strings
Hi, is there a way of having the decimal as a non-literal? One of the prompt values we are using this for, goes anywhere from 0.1 on up, but I would like it to display only "1" when some enters 1, and ".9" or "1.1" when some enters those numbers respectively. So far it looks like the decimal point is always there.
I found sort of a work around, by using G as the format string, and then using the standard mask of double:-9.4 . this works when the field isn't selected, and when selected it will display the standard 9.4 layout. of course, to make sure the entire field is selected, it required two hooks, one on click and one on before entering via tab to select the entire field, instead of the ordinal or decimal section.
Long story short, depending what the customer requests, I may go back to the texteditor box instead.
Hi,
I think the best way to achieve that would be to use UltraTextEditor instead of UltraNumericEditor. That way there is no masking at all.