User Control Object - Using as Control Type

Official Content

Many times you want to create a User Control object and show it within the Control Type property of an attribute or variable.

To achieve it, you need to do the following:

1) Create a User Control object

2) Set its Is Control Type property = True

When you enable the Is Control Type property, the Data Type Filter property appears in order to indicate the data type for which this control is appropriate.

3) Indicate which element of the control Layout is the one that maintains the value of the control.

This is indicated in the Screen Template tab of the user control, by including the expression {{DataElement}} in the desired tag:

<input type="numeric" {{DataElement}}></input>

This means that the value property of the input element will have the value of the User Control created.

Note that they are only the HTML elements due to a JQuery plugin or because they natively support the value property. They will be able to "maintain" the control value.

The HTML Tags available for the value property are as follows: <button>, <input>, <li>, <option>, <progress>, <param>

However, as mentioned above, any JQuery control or web component that supports the value property may be used to maintain the value of a User Control.

Assigning a value to the User Control

In order to set a value for the control, you only need to set a value for the associated variable or attribute.

Reading a User Control value

To read the control value, simply access the value of the associated variable or attribute.

 



 

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.