on 04-12-2007 11:11 AM
how can i restrict the size of an InputField to 100 characters?
Nikhil
Hi Nikhil
1) first create a Simple Type Using dictionaries in the tree structure
2)switch to representation tab and there u can set the maximum length
3)create a context and select type--> set with corresponding data type
4)now bind your input field with your the context.
regards
ambicasony
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
One solution to your problem is what valrey suggested and other can be by setting the length property of the input field accordingly.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
*Try to set the value to the "width" property of your Inputfield.
*You can have a context attribute with the type of int and bind this into
width property to set the width value during runtime also.
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nikhil,
In Local Dictionary of WD project create your own custom type that is based on string and has Max. Length = 100 restriction applied.
Change type of corresponding context attribute to this new custom type.
InputFields these are bound to aforementioned context attribute (with restricted type) will inherit max.length restriction automatically.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
I am not sure if you can do it during design time, as i dont see any property for inputfield which can restrict the input size to n characters.
You can do it programmatically in your code.
Get input value form context and check the lenght of the input value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.