| Name | Type | Default |
|
animationShowDuration
# |
Number
|
350
|
Sets or gets the duration of the show animation.
<template>
<JqxTree ref="myTree" :width="400" :animationShowDuration="1000">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
animationHideDuration
# |
Number
|
fast
|
Sets or gets the duration of the hide animation.
<template>
<JqxTree ref="myTree" :width="400" :animationHideDuration="1000">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
allowDrag
# |
Boolean
|
false
|
Enables the dragging of Tree Items.
<template>
<JqxTree ref="myTree" :width="400" :allowDrop="true" :allowDrag="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
allowDrop
# |
Boolean
|
false
|
Enables the dropping of Tree Items.
<template>
<JqxTree ref="myTree" :width="400" :allowDrop="true" :allowDrag="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
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.
<template>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
dragStart
# |
Function
|
null
|
Callback function which is called when a drag operation starts.
<template>
<JqxTree ref="myTree" :width="400" :dragStart="dragStart">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function dragStart(item) {
console.log(item);
}
</script>
|
|
dragEnd
# |
Function
|
null
|
Callback function which is called when a drag operation ends.
<template>
<JqxTree ref="myTree" :width="400" :dragEnd="dragEnd">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function dragEnd(dragItem, dropItem, args, dropPosition, tree) {
console.log(dragItem);
console.log(dropItem);
console.log(args);
console.log(dropPosition);
console.log(tree);
}
</script>
|
|
disabled
# |
Boolean
|
false
|
Gets or sets whether the tree is disabled.
<template>
<JqxTree ref="myTree" :width="400" :disabled="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
easing
# |
String
|
'easeInOutCirc'
|
Sets or gets the animation's easing to one of the JQuery's supported easings.
<template>
<JqxTree ref="myTree" :width="400" :easing="'easeInOutCirc'">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
enableHover
# |
Boolean
|
true
|
Enables or disables the hover state.
<template>
<JqxTree ref="myTree" :width="400" :enableHover="false">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
height
# |
Number | String
|
null
|
Sets or gets the tree's height.
<template>
<JqxTree ref="myTree" :width="400" :height="300">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
hasThreeStates
# |
Boolean
|
false
|
Sets or gets whether the tree checkboxes have three states - checked, unchecked and indeterminate.
<template>
<JqxTree ref="myTree" :width="400" :checkboxes="true" :hasThreeStates="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
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.
<template>
<JqxTree ref="myTree" :width="400" :incrementalSearch="false">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
keyboardNavigation
# |
Boolean
|
true
|
Enables or disables the key navigation.
<template>
<JqxTree ref="myTree" :width="400" :keyboardNavigation="false">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
<template>
<JqxTree ref="myTree" :width="400" :rtl="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
source
# |
Array | Object
|
null
|
Specifies the jqxTree's data source. Use this property to populate the jqxTree.
- label - sets the item's label.
- value - sets the item's value.
- html - item's html. The html to be displayed in the item.
- id - sets the item's id.
- disabled - sets whether the item is enabled/disabled.
- checked - sets whether the item is checked/unchecked(when checkboxes are enabled).
- expanded - sets whether the item is expanded or collapsed.
- selected - sets whether the item is selected.
- items - sets an array of sub items.
- icon - sets the item's icon(url is expected).
- iconsize - sets the size of the item's icon.
<template>
<JqxTree ref="myTree" :width="200" :source="source" />
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const source = ref([
{ label: 'Mail', expanded: true, items: [{ label: 'Calendar' }, { label: 'Contacts' }] },
{
label: 'Inbox',
items: [
{ label: 'Admin' },
{ label: 'Corporate' },
{ label: 'Finance' },
{ label: 'Other' }
]
},
{ label: 'Deleted Items' }
]);
</script>
|
|
toggleIndicatorSize
# |
Number
|
16
|
Sets or gets the size of the expand/collapse arrows.
<template>
<JqxTree ref="myTree" :width="400" :toggleIndicatorSize="20">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
toggleMode
# |
String
|
dblclick
|
Sets or gets user interaction used for expanding or collapsing any item.
Possible Values:
'click'
'dblclick'
<template>
<JqxTree ref="myTree" :width="400" :toggleMode="'click'">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxTree ref="myTree" :width="400" :theme="'material'">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
width
# |
Number | String
|
null
|
Sets or gets the tree's width.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
</script>
|
|
|
|
added
# |
Event
|
|
This event is triggered when the user adds a new tree item.
Code examples #
Bind to the added event of jqxTree.
<template>
<div>
<JqxTree ref="myTree" @added="onAdded($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="50" @click="add()">Add</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myTree = ref(null);
function add() {
myTree.value.addTo({ label: 'Item' });
}
function onAdded(event) {
alert('do something...');
}
</script>
|
|
checkChange
# |
Event
|
|
This event is triggered when the user checks, unchecks or the checkbox is in indeterminate state.
Code examples #
Bind to the checkChange event of jqxTree.
<template>
<JqxTree ref="myTree" @checkChange="onCheckChange($event)" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onCheckChange(event) {
alert('do something...');
}
</script>
|
|
collapse
# |
Event
|
|
This event is triggered when the user collapses a tree item.
Code examples #
Bind to the collapse event of jqxTree.
<template>
<JqxTree ref="myTree" @collapse="onCollapse($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onCollapse(event) {
alert('do something...');
}
</script>
|
|
dragStart
# |
Event
|
|
This event is triggered when the user starts a drag operation.
Code examples #
Bind to the dragStart event of jqxTree.
<template>
<JqxTree ref="myTree" @dragStart="onDragStart($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onDragStart(event) {
alert('do something...');
}
</script>
|
|
dragEnd
# |
Event
|
|
This event is triggered when the user drops an item.
Code examples #
Bind to the dragEnd event of jqxTree.
<template>
<JqxTree ref="myTree" @dragEnd="onDragEnd($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onDragEnd(event) {
alert('do something...');
}
</script>
|
|
expand
# |
Event
|
|
This event is triggered when the user expands a tree item.
Code examples #
Bind to the expand event of jqxTree.
<template>
<JqxTree ref="myTree" @expand="onExpand($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onExpand(event) {
alert('do something...');
}
</script>
|
|
itemClick
# |
Event
|
|
This event is triggered when the user clicks a tree item.
Code examples #
Bind to the itemClick event of jqxTree.
<template>
<JqxTree ref="myTree" @itemClick="onItemClick($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onItemClick(event) {
alert('do something...');
}
</script>
|
|
removed
# |
Event
|
|
This event is triggered when the user removes a tree item.
Code examples #
Bind to the removed event of jqxTree.
<template>
<div>
<JqxTree ref="myTree" @removed="onRemoved($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="remove()">Remove Selected</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myTree = ref(null);
function remove() {
let selected = myTree.value.getSelectedItem();
myTree.value.removeItem(selected);
}
function onRemoved(event) {
alert('do something...');
}
</script>
|
|
select
# |
Event
|
|
This event is triggered when the user selects a tree item.
Code examples #
Bind to the select event of jqxTree.
<template>
<JqxTree ref="myTree" @select="onSelect($event)" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
function onSelect(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
addBefore
# |
item, id
|
None
|
Adds an item as a sibling of another item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
let items = myTree.value.getItems();
let element = items[0].element;
myTree.value.addBefore('item', element);
});
</script>
|
|
addAfter
# |
item, id
|
None
|
Adds an item as a sibling of another item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
let items = myTree.value.getItems();
let element = items[0].element;
myTree.value.addAfter('item', element);
});
</script>
|
|
addTo
# |
item, id
|
None
|
Adds an item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
let items = myTree.value.getItems();
let element = items[0].element;
myTree.value.addTo('item', element);
});
</script>
|
|
clear
# |
None
|
None
|
Removes all elements.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.clear();
});
</script>
|
|
checkAll
# |
None
|
None
|
Checks all tree items.
<template>
<div>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="checkAll()">Check All</jqxButton>
<jqxButton :width="150" @click="uncheckAll()">Uncheck All</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myTree = ref(null);
function checkAll() {
myTree.value.checkAll();
}
function uncheckAll() {
myTree.value.uncheckAll();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
checkItem
# |
item, checked
|
None
|
Checks a tree item.
<template>
<div>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li ref="government">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="check()">Check 'Government'</jqxButton>
<jqxButton :width="150" @click="uncheck()">Uncheck 'Government'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const government = ref(null);
const myTree = ref(null);
function check() {
let item = government.value;
myTree.value.checkItem(item);
}
function uncheck() {
let item = government.value;
myTree.value.uncheckItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
collapseAll
# |
None
|
None
|
Collapses all items.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.collapseAll();
});
</script>
|
|
collapseItem
# |
item
|
None
|
Collapses a tree item by passing an element as parameter.
<template>
<div>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="expand()">Expand 'Solutions'</jqxButton>
<jqxButton :width="150" @click="collapse()">Collapse 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function expand() {
let item = solutions.value;
myTree.value.expandItem(item);
}
function collapse() {
let item = solutions.value;
myTree.value.collapseItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
destroy
# |
None
|
None
|
Destroy the jqxTree widget. The destroy method removes the jqxTree widget from the web page.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.destroy();
});
</script>
|
|
disableCheckbox
# |
item
|
None
|
Disables a tree item checkbox.
<template>
<div>
<JqxTree ref="myTree"
:width="400">
<ul>
<li item-selected='true'>Home</li>
<li ref="solutions" item-expanded='true'>
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="disable()">Disable 'Solutions'</jqxButton>
<jqxButton :width="150" @click="enable()">Enable 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from "vue";
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function disable() {
let item = solutions.value;
myTree.value.disableCheckbox(item);
}
function enable() {
let item = solutions.value;
myTree.value.enableItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
disableItem
# |
item
|
None
|
Disables a tree item.
<template>
<div>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="disable()">Disable 'Solutions'</jqxButton>
<jqxButton :width="150" @click="enable()">Enable 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function disable() {
let item = solutions.value;
myTree.value.disableItem(item);
}
function enable() {
let item = solutions.value;
myTree.value.enableItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
ensureVisible
# |
item
|
None
|
Ensures the visibility of an element.
<template>
<JqxTree ref="myTree" :width="300" :height="150">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li ref="industries">All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const industries = ref(null);
const myTree = ref(null);
onMounted(() => {
let item = industries.value;
myTree.value.ensureVisible(item);
});
</script>
|
|
enableCheckbox
# |
item
|
None
|
Enables a tree item checkbox.
<template>
<div>
<JqxTree ref="myTree"
:width="400">
<ul>
<li item-selected='true'>Home</li>
<li ref="solutions" item-expanded='true'>
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="disable()">Disable 'Solutions'</jqxButton>
<jqxButton :width="150" @click="enable()">Enable 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from "vue";
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function disable() {
let item = solutions.value;
myTree.value.disableCheckbox(item);
}
function enable() {
let item = solutions.value;
myTree.value.enableCheckbox(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
enableItem
# |
item
|
None
|
Enables a tree item.
<template>
<div>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="disable()">Disable 'Solutions'</jqxButton>
<jqxButton :width="150" @click="enable()">Enable 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function disable() {
let item = solutions.value;
myTree.value.disableItem(item);
}
function enable() {
let item = solutions.value;
myTree.value.enableItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
enableAll
# |
None
|
None
|
Enables all items.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.enableAll();
});
</script>
|
|
expandAll
# |
None
|
None
|
Expands all items.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.expandAll();
});
</script>
|
|
expandItem
# |
item
|
None
|
Expands a tree item by passing an element as parameter.
<template>
<div>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="expand()">Expand 'Solutions'</jqxButton>
<jqxButton :width="150" @click="collapse()">Collapse 'Solutions'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const solutions = ref(null);
const myTree = ref(null);
function expand() {
let item = solutions.value;
myTree.value.expandItem(item);
}
function collapse() {
let item = solutions.value;
myTree.value.collapseItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
focus
# |
None
|
None
|
Sets the focus to the widget.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.focus();
});
</script>
|
|
getCheckedItems
# |
None
|
Array
|
Gets an array with all checked tree items.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li ref="education">Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const education = ref(null);
const myTree = ref(null);
onMounted(() => {
let item = education.value;
myTree.value.checkItem(item, true);
let items = myTree.value.getCheckedItems();
});
</script>
|
|
getUncheckedItems
# |
None
|
Array
|
Gets an array with all unchecked tree items.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li ref="education">Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const education = ref(null);
const myTree = ref(null);
onMounted(() => {
let item = education.value;
myTree.value.checkItem(item, true);
let items = myTree.value.getUncheckedItems();
});
</script>
|
|
getItems
# |
None
|
Array
|
Gets an array with all tree items.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
const value = myTree.value.getItems();
});
</script>
|
|
getItem
# |
element
|
Object
|
Gets the tree item associated to a LI tag passed as parameter. The returned value is an object.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li ref="government">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const government = ref(null);
const myTree = ref(null);
onMounted(() => {
let ref = government.value;
let item = myTree.value.getItem(ref);
alert(item.label);
});
</script>
|
|
getSelectedItem
# |
None
|
Object
|
Gets the selected tree item.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
const value = myTree.value.getSelectedItem();
});
</script>
|
|
getPrevItem
# |
item
|
Object
|
Gets the item above another item. The returned value is an object.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li>Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li item-selected="true">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
const selectedItem = myTree.value.getSelectedItem();
const value = myTree.value.getPrevItem(selectedItem);
});
</script>
|
|
getNextItem
# |
item
|
Object
|
Gets the item below another item. The returned value is an object.
- label - gets item's label.
- value - gets the item's value.
- disabled - gets whether the item is enabled/disabled.
- checked - gets whether the item is checked/unchecked.
- element - gets the item's LI tag.
- parentElement - gets the item's parent LI tag.
- isExpanded - gets whether the item is expanded or collapsed.
- selected - gets whether the item is selected or not.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li>Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li item-selected="true">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
const selectedItem = myTree.value.getSelectedItem();
const value = myTree.value.getNextItem(selectedItem);
});
</script>
|
|
hitTest
# |
left, top
|
Object
|
Gets an item at specific position. The method expects 2 parameters - left and top. The coordinates are relative to the document.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
const value = myTree.value.hitTest(100, 100);
});
</script>
|
|
removeItem
# |
item
|
None
|
Removes an item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li ref="government">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const government = ref(null);
const myTree = ref(null);
onMounted(() => {
let item = government.value;
myTree.value.removeItem(item);
});
</script>
|
|
render
# |
None
|
None
|
Renders the jqxTree widget.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.render();
});
</script>
|
|
refresh
# |
None
|
None
|
Refreshes the jqxTree widget. The refresh method will update the jqxTree's layout and size.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
myTree.value.refresh();
});
</script>
|
|
selectItem
# |
item
|
None
|
Selects an item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li ref="government">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const government = ref(null);
const myTree = ref(null);
onMounted(() => {
let item = government.value;
myTree.value.selectItem(item);
});
</script>
|
|
uncheckAll
# |
None
|
None
|
Unchecks all tree items.
<template>
<div>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="checkAll()">Check All</jqxButton>
<jqxButton :width="150" @click="uncheckAll()">Uncheck All</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myTree = ref(null);
function checkAll() {
myTree.value.checkAll();
}
function uncheckAll() {
myTree.value.uncheckAll();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
uncheckItem
# |
item
|
None
|
Unchecks a tree item.
<template>
<div>
<JqxTree ref="myTree" :width="400" :checkboxes="true">
<ul>
<li item-selected="true">Home</li>
<li ref="solutions" item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li ref="government">Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
<jqxButton :width="150" @click="check()">Check 'Government'</jqxButton>
<jqxButton :width="150" @click="uncheck()">Uncheck 'Government'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const government = ref(null);
const myTree = ref(null);
function check() {
let item = government.value;
myTree.value.checkItem(item);
}
function uncheck() {
let item = government.value;
myTree.value.uncheckItem(item);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
margin-right: 50px;
}
</style>
|
|
updateItem
# |
item, newItem
|
None
|
Updates an item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
let items = myTree.value.getItems();
myTree.value.updateItem(items[0], { label: 'Updated Item' });
});
</script>
|
|
val
# |
value
|
String
|
Sets or gets the selected item.
<template>
<JqxTree ref="myTree" :width="400">
<ul>
<li item-selected="true">Home</li>
<li item-expanded="true">
Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>
Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li>Web conferencing</li>
</ul>
</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</JqxTree>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxTree from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxtree.vue';
const myTree = ref(null);
onMounted(() => {
let item = myTree.value.val();
});
</script>
|