Editar

Compartilhar via


quickViewControl.getControl (Client API reference)

Gets the control on a form.

Syntax

quickViewControl.getControl(arg);

Parameter

arg: Optional. You can access a single control in the constituent controls collection by passing an argument as either the name or the index value of the constituent control in a quick view control. For example: quickViewControl.getControl("firstname") or quickViewControl.getControl(0)

Return Value

Type: Object or Object collection.

Description: Object if you use the method with parameter; object collection if you use the method without any parameters.

Remarks

After you have retrieved a constituent control in a quick view control, you can use any of the methods supported for a control in model-driven apps on the constituent control that does not alter the constituent control data. This is because constituent controls in a quick view control are read only. For example, you can use:

quickViewControl.getControl(0).getAttribute()

For more information about methods supported for a control, see Controls.

Important

The getAttribute or any data related methods on a constituent control might not work on the main form OnLoad event because the quick view form that its bound to might not have loaded completely when the main form has loaded. You must use the isLoaded method for the quick view control instance to help you determine if the bounded quick view form has loaded completely.

Also, the way you retrieve constituent controls in a quick view control on forms using the new form rendering engine is different from the legacy forms. So, if you are using legacy forms and have code targeting constituent controls in a quick view control, you must update your code when you decide to use the new form rendering engine.

formContext.ui.quickForms