Name | Type | Default | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
autoHeight | Boolean | false | |||||||||
Sets or gets whether the listbox's height is equal to the sum of each item's height Code example
Set the
Get the
Try it: autoHeight is set to true
|
|||||||||||
allowDrag(requires jqxdragdrop.js) | Boolean | false | |||||||||
Enables/disables the dragging of ListBox Items. Code example
Set the
Get the
Try it: allowDrag is set to true
|
|||||||||||
allowDrop(requires jqxdragdrop.js) | Boolean | false | |||||||||
Enables/disables the dropping of ListBox Items. Code example
Set the
Get the
Try it: allowDrop is set to true
|
|||||||||||
checkboxes | Boolean | false | |||||||||
Sets or gets whether the listbox should display a checkbox next to each item. Code example
Set the
Get the
Try it: checkboxes is set to true
|
|||||||||||
disabled | Boolean | false | |||||||||
Enables/disables the listbox. Code example
Set the
Get the
Try it: disabled is set to true
|
|||||||||||
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. Code example
Set the
Get the
Try it: displayMember is set to text
|
|||||||||||
dropAction(requires jqxdragdrop.js) | String | 'default'. | |||||||||
Sets or gets the drop action when an item is dropped. Possible Values:
Code example
Set the
Get the
Try it: dropAction is set to 'copy'
|
|||||||||||
dragStart | Function | null | |||||||||
Callback function which is called when a drag operation starts. Code example
Set the
Get the
|
|||||||||||
dragEnd | Function | null | |||||||||
Callback function which is called when a drag operation ends. Code example
Set the
Get the
|
|||||||||||
enableHover | Boolean | true | |||||||||
Enables/disables the hover state. Code example
Set the
Get the
Try it: enableHover is set to false
|
|||||||||||
enableSelection | Boolean | true | |||||||||
Enables/disables the selection. Code example
Set the
Get the
Try it: enableSelection is set to false
|
|||||||||||
equalItemsWidth | Boolean | true | |||||||||
Sets or gets whether the items width should be equal to the listbox's width. Code example
Set the
Get the
Try it: equalItemsWidth is set to false
|
|||||||||||
filterable | Boolean | false | |||||||||
Determines whether the Filtering is enabled. Code example
Set the
Get the
Try it: filterable is set to true
|
|||||||||||
filterHeight | Number | 27 | |||||||||
Determines the Filter's height. Code example
Set the
Get the
Try it: filterHeight is set to 30
|
|||||||||||
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. Code example
Set the
Get the
Try it: filterDelay is set to 300
|
|||||||||||
filterPlaceHolder | String | "Looking for" | |||||||||
Determines the Filter input's place holder. Code example
Set the
Get the
|
|||||||||||
height | String | null | |||||||||
Sets or gets the listbox's height. Code example
Set the
Get the
Try it: height is set to '200px'
|
|||||||||||
hasThreeStates | Boolean | false | |||||||||
Sets or gets whether the checkboxes have three states - checked, unchecked and indeterminate. Code example
Set the
Get the
Try it: hasThreeStates is set to true
|
|||||||||||
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. Code example
Set the
Get the
Try it: itemHeight is set to 30
|
|||||||||||
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. Code example
Set the
Get the
|
|||||||||||
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. Code example
Set the
Get the
|
|||||||||||
multiple | Boolean | false | |||||||||
Enables/disables the multiple selection. When this property is set to true, the user can select multiple items. Code example
Set the
Get the
Try it: multiple is set to true
|
|||||||||||
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. Code example
Set the
Get the
Try it: multipleextended is set to true
|
|||||||||||
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. Code example
Set the
Get the
|
|||||||||||
rtl | Boolean | false | |||||||||
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts. Code example
Set the
Get the
Try it: rtl is set to true
|
|||||||||||
selectedIndex | Number | -1 | |||||||||
Sets or gets the selected index. Code example
Set the
Get the
Try it: selectedIndex is set to 2
|
|||||||||||
source | Array | null | |||||||||
Sets or gets the item's source. Code example
Set the
Binding using the jqx.dataAdapter(requires jqxdata.js):
Get the
Try it: source is set to source
|
|||||||||||
scrollBarSize | Number | 17 | |||||||||
Sets or gets the scrollbars's size. Code example
Set the
Get the
Try it: scrollBarSize is set to 15
|
|||||||||||
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:
Code example
Set the
Get the
|
|||||||||||
theme | String | '' | |||||||||
Sets the widget's theme. jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file. In order to set a theme, you need to do the following:
Try it: theme is set to 'energyblue'
|
|||||||||||
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. Code example
Set the
Get the
Try it: valueMember is set to value
|
|||||||||||
width | String | null | |||||||||
Sets or gets the listbox's width. Code example
Set the
Get the
Try it: width is set to '200px'
|
|||||||||||
Events |
|||||||||||
bindingComplete | Event | ||||||||||
This event is triggered when the data binding operation is completed. Code example
Bind to the
|
|||||||||||
change | Event | ||||||||||
This event is triggered when the user selects an item. Code example
Bind to the
The item object has the following fields:
|
|||||||||||
checkChange | Event | ||||||||||
This event is triggered when the user checks or unchecks an item. Code example
Bind to the
The item object has the following fields:
|
|||||||||||
dragStart | Event | ||||||||||
This event is triggered when the user starts a drag operation. Code example
Bind to the
|
|||||||||||
dragEnd | Event | ||||||||||
This event is triggered when the user drops an item. Code example
Bind to the drag
|
|||||||||||
select | Event | ||||||||||
This event is triggered when the user selects an item. Code example
Bind to the
The item object has the following fields:
|
|||||||||||
unselect | Event | ||||||||||
This event is triggered when the user unselects an item. Code example
Bind to the
The item object has the following fields:
|
|||||||||||
Methods |
|||||||||||
addItem | Method | ||||||||||
Adds a new item to the jqxListBox. Returns 'true', if the new item is added or 'false' if the item is not added. The following fields can be used for the new item:
None Code example
Invoke the
Code example 2
Invoke the
Try it: adds an item in the jqxListBox
|
|||||||||||
beginUpdate | Method | ||||||||||
Stops the ListBox's rendering. That method is usually used when multiple items need to be inserted or removed dynamically.
None Code example
Invoke the
Try it: beginUpdate is invoked.
|
|||||||||||
clear | Method | ||||||||||
Clears all items.
None Code example
Invoke the
|
|||||||||||
clearSelection | Method | ||||||||||
Clears all selected items.
None Code example
Invoke the
|
|||||||||||
checkIndex | Method | ||||||||||
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.
None Code example
Invoke the
Try it: checks a box in the jqxListBox
|
|||||||||||
checkItem | Method | ||||||||||
Checks an item.
None Code example
Invoke the
*To get an item, use the getItem or getItemByValue methods.
Try it: checks item in the jqxListBox
|
|||||||||||
checkAll | Method | ||||||||||
Checks all list items when the 'checkboxes' property value is true.
None Code example
Invoke the
|
|||||||||||
clearFilter | Method | ||||||||||
Clears the widget's filter when filtering is applied.
None Code examples
Invoke the
Try it: clears the jqxListBox's Filter.
|
|||||||||||
destroy | Method | ||||||||||
Destroy the jqxListBox widget. The destroy method removes the jqxListBox widget from the web page.
None Code example
Invoke the
Try it: destroys the jqxListBox
|
|||||||||||
disableItem | Method | ||||||||||
Disables an item. Item is an Object. The following fields can be used for the item:
None Code example
Invoke the
|
|||||||||||
disableAt | Method | ||||||||||
Disables an item by index. Index is a number.
None Code example
Invoke the
|
|||||||||||
enableItem | Method | ||||||||||
Enables an item. Item is an Object. The following fields can be used for the item:
None Code example
Invoke the
|
|||||||||||
enableAt | Method | ||||||||||
Enables a disabled item by index. Index is a number.
None Code example
Invoke the
|
|||||||||||
ensureVisible | Method | ||||||||||
Ensures that an item is visible. Index is number. If necessary scrolls to the item. Insted of Index, you can also pass the item's value.
None Code example
Invoke the
|
|||||||||||
endUpdate | Method | ||||||||||
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.
None Code example
Invoke the
Try it: endUpdate is invoked.
|
|||||||||||
focus | Method | ||||||||||
Sets the focus to the jqxListBox.
None Code example
Invoke the
Try it: focuses the jqxListBox
|
|||||||||||
getItems | Method | ||||||||||
Gets all items. The returned value is an array of Items. Each item represents an Object with the following fields.Item Fields
Array Code example
Invoke the
Get the first item.
|
|||||||||||
getSelectedItems | Method | ||||||||||
Gets the selected ListBox items. The returned value is an Array of items. Each item represents an Object with the following fields.Item Fields
Arrays Code example
Invoke the
|
|||||||||||
getCheckedItems | Method | ||||||||||
Gets the checked ListBox items. Returns an Array of checked items. Each item represents an Object with the following fields.Item Fields
Array Code example
Invoke the
|
|||||||||||
getItem | Method | ||||||||||
Gets an item by index. The returned value is an Object with the following fields:
Object Code example
Invoke the
|
|||||||||||
getItemByValue | Method | ||||||||||
Gets an item by its value. The returned value is an Object with the following fields:
Object Code example
Invoke the
|
|||||||||||
getSelectedItem | Method | ||||||||||
Gets the selected item. The returned value is an Object or null(if there is no selected item). Item Fields
Object Code example
Invoke the
|
|||||||||||
getSelectedIndex | Method | ||||||||||
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.
Number Code example
Invoke the
|
|||||||||||
insertAt | Method | ||||||||||
Inserts a new item to the jqxListBox. Returns 'true', if the new item is inserted or false if the insertaion fails. The first parameter is Object or String - the new item. The second parameter is Number - the item's index. The following fields can be used for the new item:
None Code example
Invoke the
Code example 2
Invoke the
|
|||||||||||
invalidate | Method | ||||||||||
The invalidate method will repaint the jqxListBox's items.
None Code example
Invoke the
Try it: invalidates the jqxListBox
|
|||||||||||
indeterminateItem | Method | ||||||||||
Indeterminates an item.
None Code example
Invoke the
*To get an item, use the getItem or getItemByValue methods.
|
|||||||||||
indeterminateIndex | Method | ||||||||||
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.
None Code example
Invoke the
|
|||||||||||
removeItem | Method | ||||||||||
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.
None Code example
Invoke the
|
|||||||||||
removeAt | Method | ||||||||||
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.
None Code example
Invoke the
|
|||||||||||
render | Method | ||||||||||
Renders the jqxListBox widget.
None Code example
Invoke the
Try it: renders the jqxListBox
|
|||||||||||
refresh | Method | ||||||||||
Refreshes the jqxListBox widget. The refresh method will update the jqxListBox's layout, size and data.
None Code example
Invoke the
Try it: refreshes the jqxListBox
|
|||||||||||
selectItem | Method | ||||||||||
Selects an item.
None Code example
Invoke the
*To get an item, use the getItem or getItemByValue methods.
Try it: select item in the jqxListBox
|
|||||||||||
selectIndex | Method | ||||||||||
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.
None Code example
Invoke the
|
|||||||||||
updateItem | Method | ||||||||||
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. The following fields can be used for the item:
None Code example
Invoke the
|
|||||||||||
updateAt | Method | ||||||||||
Updates an item. The first parameter is the new item. The second parameter is the index of the item to be updated. The following fields can be used for the item:
None Code example
Invoke the
|
|||||||||||
unselectIndex | Method | ||||||||||
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.
None Code example
Invoke the
|
|||||||||||
unselectItem | Method | ||||||||||
Unselects an item.
None Code example
Invoke the
*To get an item, use the getItem or getItemByValue methods.
Try it: unselect item in the jqxListBox
|
|||||||||||
uncheckIndex | Method | ||||||||||
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.
None Code example
Invoke the
Try it: unchecks a box in the jqxListBox
|
|||||||||||
uncheckItem | Method | ||||||||||
Unchecks an item.
None Code example
Invoke the
*To get an item, use the getItem or getItemByValue methods.
Try it: unchecks item in the jqxListBox
|
|||||||||||
uncheckAll | Method | ||||||||||
Unchecks all list items when the 'checkboxes' property value is true.
None Code example
Invoke the
|
|||||||||||
val | Method | ||||||||||
Sets or gets the selected value.
String Code example
Invoke the
// Get the value using jQuery's val()
// Set value.
// Set value using jQuery's val().
|