YouTip LogoYouTip

Plugins Form Combotree

# jQuery EasyUI Form Plugin - Combotree * * jQuery EasyUI Plugins](#) * * * Extends from $.fn.combo.defaults and $.fn.tree.defaults. Use $.fn.combotree.defaults to override the default defaults. The combotree combines a selection control and a dropdown tree. It is similar to combobox, but the list is replaced with a tree component. The combotree supports a tree with tree state checkboxes for multiple selection. !(#) ## Dependencies * combo * tree ## Usage Create a combotree from markup. Create a combotree using javascript. $('#cc').combotree({ url: 'get_data.php', required: true}); ## Properties The properties extend from combo and tree, the following properties are added or overridden for combotree. | Name | Type | Description | Default | | :--- | :--- | :--- | :--- | | editable | boolean | Defines if the user can type text directly into the field. | false | ## Events The events extend from combo and tree. ## Methods The methods extend from combo, the following methods are added or overridden for combotree. | Name | Parameter | Description | | :--- | :--- | :--- | | options | none | Returns the options object. | | tree | none | Returns the tree object. The following example shows how to get the selected tree node. var t = $('#cc').combotree('tree');// get the tree objectvar n = t.tree('getSelected');// get selected node alert(n.text); | | loadData | data | Load local tree data. Code example: $('#cc').combotree('loadData', [{id: 1,text: 'Languages',children: [{id: 11,text: 'Java'},{id: 12,text: 'C++'}]}]); | | reload | url | Request remote tree data again. Pass 'url' parameter to override the original URL value. | | clear | none | Clear the component value. | | setValues | values | Set the component value array. Code example: $('#cc').combotree('setValues', [1,3,21]); | | setValue | value | Set the component value. Code example: $('#cc').combotree('setValue', 6); | * * jQuery EasyUI Plugins](#)
← Plugins Form CombogridPlugins Form Combobox β†’