| Function |
Return type |
Description |
__construct($id:string)
|
|
Create instance of tree menu with unique ID.
|
GetId()
|
String
|
Get unique ID specified in constructor.
|
AddChild($child:SMTreeMenuItem)
|
|
Add root item to tree. See class description for SMTreeMenuItem for further information.
|
RemoveChild($id:string)
|
Boolean
|
Remove root item by unique ID. Returns True on success, otherwise False (item not found).
|
| RemoveChild($id:string, $searchDeep:boolean) |
Boolean |
Remove child by unique ID from anywhere in the hierarchy, if $searchDeep is True. Returns True on success, otherwise False (item not found). |
SetChildren($children:SMTreeMenuItem[])
|
|
Set internal child collection.
|
GetChildren()
|
SMTreeMenuItem[]
|
Get internal child collection.
|
GetChild($id:string)
|
SMTreeMenuItem
|
Get root item by unique ID. Returns NULL if not found.
|
| GetChild($id:string, $searchDeep:boolean) |
SMTreeMenuItem |
Get item by unique ID. Search all children and their children if $searchDeep is True. Returns NULL if not found.
|
SetAutoPostBack($value:boolean)
|
|
Set True to perform auto post back when an item is selected, False not to (default).
|
GetAutoPostBack()
|
Boolean
|
Get value indicating whether auto post back has been enabled or not.
|
SetCollapsed($value:boolean)
|
|
Set True to have all items automatically collapse, False not to (default)
|
GetCollapsed()
|
Boolean
|
Get value indicating whether all items by default are collepsed or not.
|
SetRestoreState($value:boolean)
|
|
Set True to remember which nodes are collepsed and which are expanded, False not to. A cookie is used to remember the state. This feature is enabled by default.
|
GetRestoreState()
|
Boolean
|
Get value indicating whether the state of the menu will be stored locally on the computer or not.
|
PerformedPostBack()
|
Boolean
|
Returns True if control performed a post back, otherwise False.
|
GetSelectedId()
|
String
|
Returns the ID of the selected node. Returns NULL if post back has not been performed, or if no selection has been made.
|
GetSelectedValue()
|
String
|
Returns the value of the selected node. Returns NULL if post back has not been performed, or if node is not found (ie if it has been removed in another session).
|
SetSelected($id:string)
|
|
Set selected node by its unique ID.
|
SetRender($value:boolean)
|
|
Set True to have control rendered when invoking Render(), false not to.
|
| GetRender() |
Boolean |
Get value indicating whether control is going to be rendered. |
| Render() |
String |
Get code representing the control client side. |