cpr.controls.TreeItem
Items of Tree, LinkedCombobox, and LinkedListbox. An item that has label, value, and parentValue and provides an icon as an option. Used in tree components with a hierarchical structure.
Index
Name |
Type |
Description |
checked |
Boolean |
Returns true or false depending on whether or not it is checked. |
children |
TreeItem[] |
Returns child items. |
depth |
Number |
Returns the depth value of an item. |
expanded |
Boolean |
Returns whether the item is expanded. |
icon |
String |
Get the URL of the icon representing the item. |
label |
String |
Returns the text to be displayed for the item. |
parentItem |
TreeItem |
Returns the parent's item. |
parentValue |
String |
Get the parent's value. |
row |
Row |
For items bound to the dataset, it returns a Row. |
tooltip |
String |
Get the tooltip value for an item. |
value |
String |
Returns the value of item. |
Constructor
Creates a tree item.
name |
type |
description |
label
|
String |
The displayed text of the tree item. |
value
|
String |
The value of the tree item. |
parentValue
|
String |
The value of the item's parent item. |
Properties
type
|
Boolean |
get
|
Returns true or false depending on whether or not it is checked.
|
set
|
Check it.
|
type
|
TreeItem[] |
readonly
|
Returns child items.
|
type
|
Number |
readonly
|
Returns the depth value of an item.
|
type
|
Boolean |
readonly
|
Returns whether the item is expanded.
|
declaring type
|
Item |
type
|
String |
get
|
Get the URL of the icon representing the item.
|
set
|
Specifies the URL of the icon representing the item.
|
declaring type
|
Item |
type
|
String |
get
|
Returns the text to be displayed for the item.
|
set
|
Sets the text to be displayed for the item.
|
type
|
TreeItem |
readonly
|
Returns the parent's item.
|
type
|
String |
get
|
Get the parent's value.
|
set
|
Set the parent's value.
|
declaring type
|
Item |
type
|
Row |
readonly
|
For items bound to the dataset, it returns a Row. If none, it returns null.
|
declaring type
|
Item |
type
|
String |
get
|
Get the tooltip value for an item.
|
set
|
Set a tooltip on the item.
|
declaring type
|
Item |
type
|
String |
get
|
Returns the value of item.
|
set
|
Set the value of item.
|
Methods
Bind that attribute. Items in datasets do not support binding.
name |
type |
description |
name
|
String |
The attribute name to bind. |
Returns the bind context.
Find the parent item with value. Returns true if present.
name |
type |
description |
value
|
String |
|
Returns whether the property is bound. Items in datasets do not support binding.
name |
type |
description |
name
|
String |
Attribute name |
Creates an input context object to execute an expression expression that takes a given item as input.
name |
type |
description |
controloptional
|
UIControl |
defaultnull
|
Own control. If this value is not given, the ID selector within the expression will not work. |