| Name | Type | Default |
|
autoHeight
# |
Boolean
|
false
|
Sets or gets whether the listbox's height is equal to the sum of each item's height
<template>
<JqxListBox ref="myListBox" :source="source" :autoHeight="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
allowDrag
# |
Boolean
|
false
|
Enables/disables the dragging of ListBox Items.
<template>
<JqxListBox ref="myListBox" :source="source" :allowDrag="true" :allowDrop="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
allowDrop
# |
Boolean
|
false
|
Enables/disables the dropping of ListBox Items.
<template>
<JqxListBox ref="myListBox" :source="source" :allowDrag="true" :allowDrop="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
checkboxes
# |
Boolean
|
false
|
Sets or gets whether the listbox should display a checkbox next to each item.
<template>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
disabled
# |
Boolean
|
false
|
Enables/disables the listbox.
<template>
<JqxListBox ref="myListBox" :source="source" :disabled="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
displayMember
# |
String
|
""
|
Sets or gets the displayMember of the Items. The displayMember specifies the name of an object property to display. The name is contained in the collection specified by the 'source' property.
<template>
<JqxListBox ref="myListBox" :source="source" :displayMember="'text'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
{ text: 'Affogato', value: 0 },
{ text: 'Americano', value: 1 },
{ text: 'Bicerin', value: 2 },
{ text: 'Breve', value: 3 },
{ text: 'Cafe Bombon', value: 4 },
{ text: 'Cafe au lait', value: 5 }
]);
</script>
|
|
dropAction
# |
String
|
'default'.
|
Sets or gets the drop action when an item is dropped.
Possible Values:
'default'
'copy'-adds a clone of the dropped item
'none'-means that the dropped item will not be added to a new collection and will not be removed from its parent collection
<template>
<JqxListBox ref="myListBox" :source="source" :allowDrag="true" :dropAction="'copy'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
dragStart
# |
Function
|
null
|
Callback function which is called when a drag operation starts.
<template>
<JqxListBox
ref="myListBox"
:source="source"
:allowDrag="true"
:allowDrop="true"
:dragStart="dragStart"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function dragStart(item) {
console.log('Dragging: ' + item.label);
}
</script>
|
|
dragEnd
# |
Function
|
null
|
Callback function which is called when a drag operation ends.
<template>
<JqxListBox
ref="myListBox"
:source="source"
:allowDrag="true"
:allowDrop="true"
:dragEnd="dragEnd"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function dragEnd(dragItem, dropItem) {
console.log('Dropping: ' + dragItem.label);
}
</script>
|
|
enableHover
# |
Boolean
|
true
|
Enables/disables the hover state.
<template>
<JqxListBox ref="myListBox" :source="source" :enableHover="false" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
enableSelection
# |
Boolean
|
true
|
Enables/disables the selection.
<template>
<JqxListBox ref="myListBox" :source="source" :enableSelection="false" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
equalItemsWidth
# |
Boolean
|
true
|
Sets or gets whether the items width should be equal to the listbox's width.
<template>
<JqxListBox ref="myListBox" :source="source" :equalItemsWidth="false" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
filterable
# |
Boolean
|
false
|
Determines whether the Filtering is enabled.
<template>
<JqxListBox ref="myListBox" :source="source" :filterable="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
filterHeight
# |
Number
|
27
|
Determines the Filter's height.
<template>
<JqxListBox ref="myListBox" :source="source" :filterable="true" :filterHeight="30" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
filterDelay
# |
Number
|
100
|
Determines the Filter's delay. After 100 milliseconds, the widget automatically filters its data based on the filter input's value. To perform filter only on "Enter" key press, set this property to 0.
<template>
<JqxListBox ref="myListBox" :source="source" :filterable="true" :filterDelay="300" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
filterPlaceHolder
# |
String
|
"Looking for"
|
Determines the Filter input's place holder.
<template>
<JqxListBox
ref="myListBox"
:source="source"
:filterable="true"
:filterPlaceHolder="'Filtering...'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
height
# |
String | Number
|
null
|
Sets or gets the listbox's height.
<template>
<JqxListBox ref="myListBox" :source="source" :height="200" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
hasThreeStates
# |
Boolean
|
false
|
Sets or gets whether the checkboxes have three states - checked, unchecked and indeterminate.
<template>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" :hasThreeStates="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
itemHeight
# |
Number
|
-1
|
Sets or gets the height of the jqxListBox Items. When the itemHeight == - 1, each item's height is equal to its desired height.
<template>
<JqxListBox ref="myListBox" :source="source" :itemHeight="30" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
incrementalSearch
# |
Boolean
|
true
|
Sets or gets the incrementalSearch property. An incremental search begins searching as soon as you type the first character of the search string. As you type in the search string, jqxListBox automatically selects the found item.
<template>
<JqxListBox ref="myListBox" :source="source" :incrementalSearch="false" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
incrementalSearchDelay
# |
Number
|
700
|
Sets ot gets the incrementalSearchDelay property. The incrementalSearchDelay specifies the time-interval in milliseconds after which the previous search string is deleted. The timer starts when you stop typing.
<template>
<JqxListBox ref="myListBox" :source="source" :incrementalSearchDelay="150" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
multiple
# |
Boolean
|
false
|
Enables/disables the multiple selection. When this property is set to true, the user can select multiple items.
<template>
<JqxListBox ref="myListBox" :source="source" :multiple="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
multipleextended
# |
Boolean
|
false
|
Enables/disables the multiple selection using Shift and Ctrl keys. When this property is set to true, the user can select multiple items by clicking on item and holding Shift or Ctrl.
<template>
<JqxListBox ref="myListBox" :source="source" :multipleextended="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
renderer
# |
Function
|
null
|
Callback function which is called when an item is rendered. By using the renderer function, you can customize the look of the list items.
<template>
<JqxListBox ref="myListBox" :source="source" :renderer="renderer" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function renderer(index, label, value) {
return '<i>' + value + '</i>';
}
</script>
|
|
rendered
# |
Function
|
null
|
<template>
<JqxListBox ref="myListBox" :source="source" :rendered="rendered" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function rendered() {
alert('rendered!');
}
</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>
<JqxListBox ref="myListBox" :source="source" :rtl="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
selectedIndex
# |
Number
|
-1
|
Sets or gets the selected index.
<template>
<JqxListBox ref="myListBox" :source="source" :selectedIndex="2" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
selectedIndexes
# |
Object
|
|
<template>
<JqxListBox
ref="myListBox"
:source="source"
:multiple="true"
:selectedIndexes="selectedIndexes"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const selectedIndexes = ref({ 1: true, 3: true });
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
source
# |
Array | Object
|
null
|
Sets or gets the item's source.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
scrollBarSize
# |
Number
|
17
|
Sets or gets the scrollbars's size.
<template>
<JqxListBox ref="myListBox" :source="source" :scrollBarSize="15" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
searchMode
# |
String
|
startswith
|
Sets or gets the item incremental search mode. When the user types some text in a focused ListBox, the jqxListBox widget tries to find the searched item using the entered text and the selected search mode.
Possible Values:
'none'
'contains'
'containsignorecase'
'equals'
'equalsignorecase'
'startswithignorecase'
'startswith'
'endswithignorecase'
'endswith'
<template>
<JqxListBox ref="myListBox" :source="source" :searchMode="'contains'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxListBox ref="myListBox" :source="source" :theme="'material'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
valueMember
# |
String
|
""
|
Sets or gets the valueMember of the Items. The valueMember specifies the name of an object property to set as a 'value' of the list items. The name is contained in the collection specified by the 'source' property.
<template>
<JqxListBox ref="myListBox" :source="source" :displayMember="'text'" :valueMember="'value'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
{ text: 'Affogato', value: 0 },
{ text: 'Americano', value: 1 },
{ text: 'Bicerin', value: 2 },
{ text: 'Breve', value: 3 },
{ text: 'Cafe Bombon', value: 4 },
{ text: 'Cafe au lait', value: 5 }
]);
</script>
|
|
width
# |
String | Number
|
null
|
Sets or gets the listbox's width.
<template>
<JqxListBox ref="myListBox" :source="source" :width="200" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
</script>
|
|
|
|
bindingComplete
# |
Event
|
|
This event is triggered when the data binding operation is completed.
Code examples #
Bind to the bindingComplete event of jqxListBox.
<template>
<JqxListBox ref="myListBox" @bindingComplete="onBindingComplete($event)" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onBindingComplete(event) {
alert('do something...');
}
onMounted(() => {
myListBox.value.source = source.value;
});
</script>
|
|
change
# |
Event
|
|
This event is triggered when the user selects an item.
Code examples #
Bind to the change event of jqxListBox.
<template>
<JqxListBox ref="myListBox" @change="onChange($event)" :source="source" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onChange(event) {
alert('do something...');
}
</script>
|
|
checkChange
# |
Event
|
|
This event is triggered when the user checks or unchecks an item.
Code examples #
Bind to the checkChange event of jqxListBox.
<template>
<JqxListBox ref="myListBox" @checkChange="onCheckChange($event)" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onCheckChange(event) {
alert('do something...');
}
onMounted(() => {
myListBox.value.checkboxes = true;
});
</script>
|
|
dragStart
# |
Event
|
|
This event is triggered when the user starts a drag operation.
Code examples #
Bind to the dragStart event of jqxListBox.
<template>
<JqxListBox
ref="myListBox"
@dragStart="onDragStart($event)"
:source="source"
:allowDrag="true"
:allowDrop="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
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 jqxListBox.
<template>
<JqxListBox
ref="myListBox"
@dragEnd="onDragEnd($event)"
:source="source"
:allowDrag="true"
:allowDrop="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onDragEnd(event) {
alert('do something...');
}
</script>
|
|
select
# |
Event
|
|
This event is triggered when the user selects an item.
Code examples #
Bind to the select event of jqxListBox.
<template>
<JqxListBox ref="myListBox" @select="onSelect($event)" :source="source" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onSelect(event) {
alert('do something...');
}
</script>
|
|
unselect
# |
Event
|
|
This event is triggered when the user unselects an item.
Code examples #
Bind to the unselect event of jqxListBox.
<template>
<JqxListBox ref="myListBox" @unselect="onUnselect($event)" :source="source" />
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function onUnselect(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
addItem
# |
Item
|
None
|
Adds a new item to the jqxListBox. Returns 'true', if the new item is added or 'false' if the item is not added.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.addItem('New Item');
});
</script>
|
|
beginUpdate
# |
None
|
None
|
Stops the ListBox's rendering. That method is usually used when multiple items need to be inserted or removed dynamically.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="beginUpdate()"
>Begin Update</jqxButton
>
<jqxButton style="width: 80px" @click="endUpdate()">End Update</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function beginUpdate() {
myListBox.value.beginUpdate();
}
function endUpdate() {
myListBox.value.endUpdate();
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
clear
# |
None
|
None
|
Clears all items.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.clear();
});
</script>
|
|
clearSelection
# |
None
|
None
|
Clears all selected items.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :multiple="true" />
<JqxButton style="margin-top: 10px" :width="100" @click="clearSelection()"
>Clear Selection</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function clearSelection() {
myListBox.value.clearSelection();
}
</script>
|
|
checkIndex
# |
Index
|
None
|
Checks a list item when the 'checkboxes' property value is true. The index is zero-based, i.e to check the first item, the 'checkIndex' method should be called with parameter 0.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkIndex()"
>Check 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckIndex()">Uncheck 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkIndex() {
myListBox.value.checkIndex(3);
}
function uncheckIndex() {
myListBox.value.uncheckIndex(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
checkItem
# |
Item
|
None
|
Checks an item.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkItem()"
>Check 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckItem()">Uncheck 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkItem() {
myListBox.value.checkItem('Breve');
}
function uncheckItem() {
myListBox.value.uncheckItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
checkAll
# |
None
|
None
|
Checks all list items when the 'checkboxes' property value is true.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkAll()"
>Check All</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckAll()">Uncheck All</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkAll() {
myListBox.value.checkAll();
}
function uncheckAll() {
myListBox.value.uncheckAll();
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
clearFilter
# |
None
|
None
|
Clears the widget's filter when filtering is applied.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :filterable="true" />
<JqxButton style="margin-top: 10px" :width="100" @click="clearFilter()"
>Clear Filter</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function clearFilter() {
myListBox.value.clearFilter();
}
</script>
|
|
destroy
# |
None
|
None
|
Destroy the jqxListBox widget. The destroy method removes the jqxListBox widget from the web page.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.destroy();
});
</script>
|
|
disableItem
# |
Item
|
None
|
Disables an item. Item is an object.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="enableItem()"
>Enable 'Breve'</jqxButton
>
<jqxButton style="width: 100px" @click="disableItem()">Disable 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function enableItem() {
myListBox.value.enableItem('Breve');
}
function disableItem() {
myListBox.value.disableItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
disableAt
# |
Index
|
None
|
Disables an item by index. Index is a number.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="enableItem()"
>Enable 'Breve'</jqxButton
>
<jqxButton style="width: 100px" @click="disableItem()">Disable 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function enableItem() {
myListBox.value.enableAt(3);
}
function disableItem() {
myListBox.value.disableAt(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
enableItem
# |
Item
|
None
|
Enables an item. Item is an object.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="enableItem()"
>Enable 'Breve'</jqxButton
>
<jqxButton style="width: 100px" @click="disableItem()">Disable 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function enableItem() {
myListBox.value.enableItem('Breve');
}
function disableItem() {
myListBox.value.disableItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
enableAt
# |
Index
|
None
|
Enables a disabled item by index. Index is a number.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="enableItem()"
>Enable 'Breve'</jqxButton
>
<jqxButton style="width: 100px" @click="disableItem()">Disable 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function enableItem() {
myListBox.value.enableAt(3);
}
function disableItem() {
myListBox.value.disableAt(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
ensureVisible
# |
item
|
None
|
Ensures that an item is visible. Index is number. If necessary scrolls to the item. Instead of Index, you can also pass the item's value.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.ensureVisible(8);
});
</script>
|
|
endUpdate
# |
None
|
None
|
Starts the ListBox's rendering and refreshes the ListBox. That method is usually used in combination with the 'beginUpdate' method when multiple items need to be inserted or removed dynamically.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="beginUpdate()"
>Begin Update</jqxButton
>
<jqxButton style="width: 80px" @click="endUpdate()">End Update</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function beginUpdate() {
myListBox.value.beginUpdate();
}
function endUpdate() {
myListBox.value.endUpdate();
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
focus
# |
None
|
None
|
Sets the focus to the jqxListBox.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.focus();
});
</script>
|
|
getItems
# |
None
|
Array
|
Gets all items. The returned value is an array of 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getItems();
});
</script>
|
|
getSelectedItems
# |
None
|
Arrays
|
Gets the selected ListBox items. The returned value is an Array of 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getSelectedItems();
});
</script>
|
|
getCheckedItems
# |
None
|
Array
|
Gets the checked ListBox items. Returns an Array of checked 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.checkboxes = true;
const value = myListBox.value.getCheckedItems();
});
</script>
|
|
getItem
# |
Index
|
Object
|
Gets an item by index. The returned value is an object with the following fields:
- 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getItem(3);
});
</script>
|
|
getItemByValue
# |
Item
|
Object
|
Gets an item by its value. The returned value is an object with the following fields:
- 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getItemByValue('Breve');
});
</script>
|
|
getSelectedItem
# |
None
|
Object
|
Gets the selected item. The returned value is an object or null(if there is no selected 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.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - gets the item's display html. This can be used instead of label.
- index - gets the item's index.
- group - gets the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getSelectedItem();
});
</script>
|
|
getSelectedIndex
# |
None
|
Number
|
Gets the index of the selected item. The returned value is the index of the selected item. If there's no selected item, -1 is returned.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
const value = myListBox.value.getSelectedIndex();
});
</script>
|
|
insertAt
# |
Item, Index
|
None
|
Inserts a new item to the jqxListBox. Returns 'true', if the new item is inserted or false if the insertion fails. The first parameter is object or string - the new item. The second parameter is number - the item's index.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.insertAt('New Item', 1);
});
</script>
|
|
invalidate
# |
None
|
None
|
The invalidate method will repaint the jqxListBox's items.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.invalidate();
});
</script>
|
|
indeterminateItem
# |
Item
|
None
|
Indeterminates an item.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.checkboxes = true;
myListBox.value.indeterminateItem('Breve');
});
</script>
|
|
indeterminateIndex
# |
Index
|
None
|
indeterminates a list item when the 'checkboxes' property value is true. The index is zero-based, i.e to indeterminate the first item, the 'indeterminateIndex' method should be called with parameter 0.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.checkboxes = true;
myListBox.value.indeterminateIndex(3);
});
</script>
|
|
loadFromSelect
# |
selector
|
None
|
Method: loadFromSelect
<template>
<div>
<div style="float: left">
<JqxListBox ref="myListBox" :width="200" :height="250"> </JqxListBox>
</div>
<div style="float: left">
<select style="height: 250px; width: 200px; margin-left: 30px" size="2" id="select">
<option>Affogato</option>
<option>Americano</option>
<option>Bicerin</option>
<option>Breve</option>
<option>Café Bombón</option>
<option>Caffé Corretto</option>
<option>Café Crema</option>
<option>Caffé Latte</option>
<option>Caffé macchiato</option>
<option>Café mélange</option>
<option>Coffee milk</option>
<option>Cafe mocha</option>
<option>Cappuccino</option>
<option>Carajillo</option>
<option>Cuban espresso</option>
<option>Espresso</option>
<option selected="selected">The Flat White</option>
<option>Frappuccino</option>
<option>Galao</option>
<option>Greek frappé coffee</option>
<option>Iced Coffee</option>
<option>Indian filter coffee</option>
<option>Instant coffee</option>
<option>Irish coffee</option>
<option>Liqueur coffee</option>
</select>
</div>
</div>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
let updating = false;
onMounted(() => {
myListBox.value.loadFromSelect('select');
});
</script>
|
|
removeItem
# |
Item
|
None
|
Removes an item from the listbox. Parameter type: object returned by the "getItem" method or string - the value of an item. Returns 'true', if the item is removed or 'false', if the item is not removed.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.removeItem('Breve');
});
</script>
|
|
removeAt
# |
Index
|
None
|
Removes an item from the listbox. Parameter type: number - the index of the item. The method returns 'true', if the item is removed or 'false', if the item is not removed.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.removeAt(3);
});
</script>
|
|
render
# |
None
|
None
|
Renders the jqxListBox widget.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.render();
});
</script>
|
|
refresh
# |
None
|
None
|
Refreshes the jqxListBox widget. The refresh method will update the jqxListBox's layout, size and data.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.refresh();
});
</script>
|
|
selectItem
# |
Item
|
None
|
Selects an item.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="selectItem()"
>Select 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="unselectItem()">Unselect 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function selectItem() {
myListBox.value.selectItem('Breve');
}
function unselectItem() {
myListBox.value.unselectItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
selectIndex
# |
Index
|
None
|
Selects item. Index is number. The index is zero-based, i.e to select the first item, the 'selectIndex' method should be called with parameter 0.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="selectItem()"
>Select 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="unselectItem()">Unselect 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function selectItem() {
myListBox.value.selectIndex(3);
}
function unselectItem() {
myListBox.value.unselectIndex(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
updateItem
# |
Item, Value
|
None
|
Updates an item. The first parameter is the new item. The second parameter could be an existing item or the value of an existing item.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.updateItem('New Breve', 'Breve');
});
</script>
|
|
updateAt
# |
item, index
|
None
|
Updates an item. The first parameter is the new item. The second parameter is the index of the item to be updated.
- label - determines the item's label.
- value - determines the item's value.
- disabled - determines whether the item is enabled/disabled.
- checked - determines whether item is checked/unchecked.
- hasThreeStates - determines whether the item's checkbox supports three states.
- html - determines the item's display html. This can be used instead of label.
- group - determines the item's group.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.updateAt('New Breve', 3);
});
</script>
|
|
unselectIndex
# |
index
|
None
|
Unselects item by index. The index is zero-based, i.e to select the first item, the 'unselectIndex' method should be called with parameter 0.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="selectItem()"
>Select 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="unselectItem()">Unselect 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function selectItem() {
myListBox.value.selectIndex(3);
}
function unselectItem() {
myListBox.value.unselectIndex(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
unselectItem
# |
item
|
None
|
Unselects an item.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" />
<jqxButton style="width: 100px; margin-right: 10px" @click="selectItem()"
>Select 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="unselectItem()">Unselect 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function selectItem() {
myListBox.value.selectItem('Breve');
}
function unselectItem() {
myListBox.value.unselectItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
uncheckIndex
# |
index
|
None
|
Unchecks a list item when the 'checkboxes' property value is true. The index is zero-based, i.e to uncheck the first item, the 'uncheckIndex' method should be called with parameter 0.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkIndex()"
>Check 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckIndex()">Uncheck 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkIndex() {
myListBox.value.checkIndex(3);
}
function uncheckIndex() {
myListBox.value.uncheckIndex(3);
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
uncheckItem
# |
item
|
None
|
Unchecks an item.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkItem()"
>Check 'Breve'</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckItem()">Uncheck 'Breve'</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkItem() {
myListBox.value.checkItem('Breve');
}
function uncheckItem() {
myListBox.value.uncheckItem('Breve');
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
uncheckAll
# |
None
|
None
|
Unchecks all list items when the 'checkboxes' property value is true.
<template>
<div>
<JqxListBox ref="myListBox" :source="source" :checkboxes="true" />
<jqxButton style="width: 100px; margin-right: 10px" @click="checkAll()"
>Check All</jqxButton
>
<jqxButton style="width: 120px" @click="uncheckAll()">Uncheck All</jqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
function checkAll() {
myListBox.value.checkAll();
}
function uncheckAll() {
myListBox.value.uncheckAll();
}
</script>
<style>
.jqx-button {
margin-top: 20px;
display: inline-block;
}
</style>
|
|
val
# |
value
|
String
|
Sets or gets the selected value.
<template>
<JqxListBox ref="myListBox" :source="source" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxListBox from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxlistbox.vue';
const myListBox = ref(null);
const source = ref([
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Cafe Bombon',
'Cafe au lait',
'Caffe Corretto',
'Cafe Crema',
'Caffe Latte'
]);
onMounted(() => {
myListBox.value.selectedIndex = 3;
const value = myListBox.value.val();
});
</script>
|