Name | Type | Default | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
animationShowDuration | Number | 350 | |||||||||
Sets or gets the duration of the show animation. Code examples
Set the
Get the
|
|||||||||||
animationHideDuration | Number | fast | |||||||||
Sets or gets the duration of the hide animation. Code examples
Set the
Get the
|
|||||||||||
allowDrag | Boolean | false | |||||||||
Enables the dragging of Tree Items.(requires jqxdragdrop.js) Code example
Set the
Get the
Try it: allowDrag is set to true
|
|||||||||||
allowDrop | Boolean | false | |||||||||
Enables the dropping of Tree Items.(requires jqxdragdrop.js) Code example
Set the
Get the
Try it: allowDrop is set to true
|
|||||||||||
checkboxes | Boolean | false | |||||||||
Sets or gets whether the tree should display a checkbox next to each item. In order to use this feature, you need to include the jqxcheckbox.js. Code examples
Set the
Get the
Try it: checkboxes is set to true
|
|||||||||||
dragStart | Function | null | |||||||||
Callback function which is called when a drag operation starts. Code example
Set the
|
|||||||||||
dragEnd | Function | null | |||||||||
Callback function which is called when a drag operation ends. Code example
Set the
|
|||||||||||
disabled | Boolean | false | |||||||||
Gets or sets whether the tree is disabled. Code examples
Set the
Get the
Try it: disabled is set to true
|
|||||||||||
easing | String | 'easeInOutCirc' | |||||||||
Sets or gets the animation's easing to one of the JQuery's supported easings. Code examples
Set the
Get the
Try it: easing is set to 'easeInOutCirc'
|
|||||||||||
enableHover | Boolean | true | |||||||||
Enables or disables the hover state. Code examples
Set the
Get the
Try it: enableHover is set to false
|
|||||||||||
height | Number/String | null | |||||||||
Sets or gets the tree's height. Code examples
Set the
Get the
Try it: height is set to '300px'
|
|||||||||||
hasThreeStates | Boolean | false | |||||||||
Sets or gets whether the tree checkboxes have three states - checked, unchecked and indeterminate. Code examples
Set the
Get the
Try it: hasThreeStates is set to true
|
|||||||||||
incrementalSearch | Boolean | true | |||||||||
Determines whether the incremental search is enabled. The feature allows you to quickly find and select items by typing when the widget is on focus. Code examples
Set the
Get the
Try it: incrementalSearch is set to true
|
|||||||||||
keyboardNavigation | Boolean | true | |||||||||
Enables or disables the key navigation. Code examples
Set the
Get the
|
|||||||||||
rtl | Boolean | false | |||||||||
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts. Code example
Set the
Get the
Try it: rtl is set to true
|
|||||||||||
source | Object | null | |||||||||
Specifies the jqxTree's data source. Use this property to populate the jqxTree. Each tree item in the source object may have the following fields:Item Fields
Code examples
Initialize a jqxTree with the
Try it: source is set to source
|
|||||||||||
toggleIndicatorSize | Number | 16 | |||||||||
Sets or gets the size of the expand/collapse arrows. Code examples
Set the
Get the
Try it: toggleIndicatorSize is set to 20
|
|||||||||||
toggleMode | String | dblclick | |||||||||
Sets or gets user interaction used for expanding or collapsing any item. Possible Values:
Code examples
Set the
Get the
Try it: toggleMode is set to 'click'
|
|||||||||||
theme | String | '' | |||||||||
Sets the widget's theme. jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file. In order to set a theme, you need to do the following:
Try it: theme is set to 'energyblue'
|
|||||||||||
width | Number/String | null | |||||||||
Sets or gets the tree's width. Code examples
Set the
Get the
Try it: width is set to '300px'
|
|||||||||||
Events |
|||||||||||
added | Event | ||||||||||
This event is triggered when the user adds a new tree item. Code examples
Bind to the
|
|||||||||||
checkChange | Event | ||||||||||
This event is triggered when the user checks, unchecks or the checkbox is in indeterminate state. Code examples
Bind to the
|
|||||||||||
collapse | Event | ||||||||||
This event is triggered when the user collapses a tree item. Code examples
Bind to the
|
|||||||||||
dragStart | Event | ||||||||||
This event is triggered when the user starts a drag operation. Code example
Bind to the
|
|||||||||||
dragEnd | Event | ||||||||||
This event is triggered when the user drops an item. Code example
Bind to the
|
|||||||||||
expand | Event | ||||||||||
This event is triggered when the user expands a tree item. Code examples
Bind to the
|
|||||||||||
initialized | Event | ||||||||||
This event is triggered when the jqxTree is created and initialized. Code examples
Bind to the
|
|||||||||||
itemClick | Event | ||||||||||
This event is triggered when the user clicks a tree item. Code examples
Bind to the
|
|||||||||||
removed | Event | ||||||||||
This event is triggered when the user removes a tree item. Code examples
Bind to the
|
|||||||||||
select | Event | ||||||||||
This event is triggered when the user selects a tree item. Code examples
Bind to the
|
|||||||||||
Methods |
|||||||||||
addBefore | Method | ||||||||||
Adds an item as a sibling of another item.
None Code example
Invoke the
The following code adds a new item before the first tree item:
The following code adds a new item before a tree item by using the item's ID.
Try it: adds new item in the jqxTree.
|
|||||||||||
addAfter | Method | ||||||||||
Adds an item as a sibling of another item.
None Code example
Invoke the
The following code adds a new item after the first tree item:
The following code adds a new item after a tree item by using the item's ID.
Try it: adds new item in the jqxTree.
|
|||||||||||
addTo | Method | ||||||||||
Adds an item.
None Code example
Invoke the
The following code adds a new item to the jqxTree:
The following code adds a new sub item to the first tree item:
The following code adds a new sub item to a tree item by using the item's ID.
The following code adds a new item with custom HTML and specific ID to the jqxTree.
$('#jqxTree').jqxTree('addTo', { html: <span style='font-weight: bold;' id='myItem'>Item }); |
|||||||||||
clear | Method | ||||||||||
Removes all elements.
None Code example
Invoke the
Try it: clears all items in the jqxTree.
|
|||||||||||
checkAll | Method | ||||||||||
Checks all tree items.
None Code example
Invoke the
Try it: checks all items in the jqxTree.
|
|||||||||||
checkItem | Method | ||||||||||
Checks a tree item.
None Code example
Invoke the
// check an item with id="home"
Try it: checks an item in the jqxTree.
|
|||||||||||
collapseAll | Method | ||||||||||
Collapses all items.
None Code example
Invoke the
|
|||||||||||
collapseItem | Method | ||||||||||
Collapses a tree item by passing an element as parameter.
None Code example
Invoke the
// Collapse item with id="home"
Try it: collapse an item in the jqxTree.
|
|||||||||||
destroy | Method | ||||||||||
Destroy the jqxTree widget. The destroy method removes the jqxTree widget from the web page.
None Code example
Invoke the
Try it: destroy the jqxTree.
|
|||||||||||
disableItem | Method | ||||||||||
Disables a tree item.
None Code example
Invoke the
Try it: disables an item in the jqxTree.
|
|||||||||||
ensureVisible | Method | ||||||||||
Ensures the visibility of an element.
None Code example
Invoke the
|
|||||||||||
enableItem | Method | ||||||||||
Enables a tree item.
None Code example
Invoke the
Try it: enables an item in the jqxTree.
|
|||||||||||
expandAll | Method | ||||||||||
Expandes all items.
None Code example
Invoke the
Try it: expand all items in the jqxTree.
|
|||||||||||
expandItem | Method | ||||||||||
Expands a tree item by passing an element as parameter.
None Code example
Invoke the
// Expand item with id="home"
Try it: expand an item in the jqxTree.
|
|||||||||||
focus | Method | ||||||||||
Sets the focus to the widget.
None Code example
Invoke the
Try it: focuses the jqxTree.
|
|||||||||||
getCheckedItems | Method | ||||||||||
Gets an array with all checked tree items. Each tree item has the following fields:Item Fields
Array Code example
Invoke the
|
|||||||||||
getUncheckedItems | Method | ||||||||||
Gets an array with all unchecked tree items. Each tree item has the following fields:Item Fields
Array Code example
Invoke the
|
|||||||||||
getItems | Method | ||||||||||
Gets an array with all tree items. Each tree item has the following fields:Item Fields
Array Code example
Invoke the
|
|||||||||||
getItem | Method | ||||||||||
Gets the tree item associated to a LI tag passed as parameter. The returned value is an Object. Item Fields
Object Code example
Invoke the
|
|||||||||||
getSelectedItem | Method | ||||||||||
Gets the selected tree item. Item Fields
Object Code example
Invoke the
|
|||||||||||
getPrevItem | Method | ||||||||||
Gets the item above another item. The returned value is an Object. Item Fields
Object Code example
Invoke the
|
|||||||||||
getNextItem | Method | ||||||||||
Gets the item below another item. The returned value is an Object. Item Fields
Object Code example
Invoke the
|
|||||||||||
hitTest | Method | ||||||||||
Gets an item at specific position. The method expects 2 parameters - left and top. The coordinates are relative to the document.
Object Code example
Invoke the
|
|||||||||||
removeItem | Method | ||||||||||
Removes an item.
None Code example
Invoke the
Try it: removes an item in the jqxTree.
|
|||||||||||
render | Method | ||||||||||
Renders the jqxTree widget.
None Code example
Invoke the
Try it: renders the jqxTree.
|
|||||||||||
refresh | Method | ||||||||||
Refreshes the jqxTree widget. The refresh method will update the jqxTree's layout and size.
None Code example
Invoke the
Try it: refresh the jqxTree.
|
|||||||||||
selectItem | Method | ||||||||||
Selects an item.
None Code example
Invoke the
Code example
Invoke the
// Select item with id="home"
// Clear selection.
Try it: selects item in the jqxTree.
|
|||||||||||
uncheckAll | Method | ||||||||||
Unchecks all tree items.
None Code example
Invoke the
|
|||||||||||
uncheckItem | Method | ||||||||||
Unchecks a tree item.
None Code example
Invoke the
// uncheck an item with id="home"
Try it: unchecks an item in the jqxTree.
|
|||||||||||
updateItem | Method | ||||||||||
Updates an item.
None Code example
Invoke the
The following code updates the first item.
Try it: updates an item in the jqxTree.
|
|||||||||||
val | Method | ||||||||||
Sets or gets the selected item.
String Code example
Invoke the
// Get the selected tab's index using jQuery's val()
// Set the selected item. The element should be a LI tag from the jqxTree's HTML Structure.
// Set the selected tab using jQuery's val().
|