Freigeben über


Sys.UI.Control parent Property

Gets or sets the parent control associated with the current control.

Note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.

var _parent = MyControl.get_parent();
MyControl.set_parent(value);

Parameters

Term

Definition

value

The parent control to associate with the current control.

Return Value

A reference to the parent control of the current control.

Exceptions

Exception type

Condition

Error.invalidOperation

(Debug) value represents a control that is lower in the control hierarchy.

Remarks

Use the parent property to get and set the parent control of the current control. If the parent property has not been set, when you get the parent property, the DOM is parsed to find the control that contains the current control.

See Also

Tasks

Creating Custom AJAX Client Controls

Reference

Sys.UI.Control Class

Other Resources

Language Reference