SharpUI for .NET Support

Started by Varga Szabolcs at 03-09-2007 9:35 PM. Topic has 1 replies.

Print Search Rate
Sort Posts:    
   03-09-2007, 9:35 PM
Varga Szabolcs is not online. Last active: 3/31/2009 4:42:17 AM Varga Szabolcs



Top 75 Posts
Joined on 06-22-2005
Posts 128
UiNumericEditBox Mask Property
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?
   Report 
   03-13-2007, 2:42 PM
stevena is not online. Last active: 9/26/2007 10:16:34 PM stevena

Top 10 Posts
Joined on 08-28-2004
Posts 2,700
Re: UiNumericEditBox Mask Property

Attachment: suiTextBox.zip
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.

   Report 
GrapeCity » Product Support » SharpUI for .NE... » UiNumericEditBox Mask Property

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.