Re: UiNumericEditBox Mask Property
SharpUI for .NET Support
UiNumericEditBox Mask Property
03-09-2007, 9:35 PM
How could I control the allowed number of decimal places?
For example I set the Format to '#,##0.00'.
I can still enter values with more than two decimals.
How could I prevent the user enter a number with decimals more than allowed by the Format property?
Re: UiNumericEditBox Mask Property
03-13-2007, 2:42 PM
Varga,
Thank you for the post. The format property is not designed to limit the number of characters entered into the uiTextBox. Rather, it is designed to allow the value to persist while displaying a more user-friendly representation of the characters in the uiTextBox.
The approach to limit the number of characters after the decimal point in the uiTextBox should be very similar to the approach taken to achieve this with a standard .NET textbox. In my research I came across
this forum thread
that discusses this topic. Here I found a VB.NET code snippet that might help you. I have attached a small running C# sample that uses a modified version of one of the approaches discussed.
This should help you get started. I hope this information helps you. Please let me know if I can be of further assistance. Thank you.