Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
New Member
Posts: 46
Registered: ‎03-12-2010

Numeric Control

Hi Folks,

 

I'm using the built-in NumericControl to enforce users to enter only numeric data with FormatType set to "Number" to further restrict input.

 

Is there a way to restrict the length of the text entered? (Something like a MaxLength atribute). The reason I ask is that my fields are tied to smallints and even though a little error message will result in case the value entered is large, I would like to just restrict length initially.

 

Thanks

Highlighted
Nickel Contributor
Posts: 51
Registered: ‎07-31-2008

Re: Numeric Control

allot of the properties available for SLX controls are not available at design time.  On the forms Load Action you can use either a Code Snippet or C# Snippet and from there you can access the MaxLength property of the control.  I haven't tested this property myself, but since the Currency control is just a wrapper on the native ASP.Net textbox control, it should work the same.

 

-Jeremy