EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: catasoft on October 15, 2012, 04:04:30 AM



Title: Higher ComboTree to render visible all checked options
Post by: catasoft on October 15, 2012, 04:04:30 AM
Right now, since my options are longer texts, if I select 2-3 from the list of values, only the first are displayed, and the next no longer are visible.
Since the combotree is rendered as an input box, I don't see the way in which this could be done.
Could you please suggest a way to render data in a multiline fashion? Even with a textarea, if not one/line.
Thanks a lot,
Catalin


Title: Re: Higher ComboTree to render visible all checked options
Post by: stworthy on October 15, 2012, 06:40:06 PM
It is difficult to display multiline selections in combo textbox. An alternative way to solve this issue is to place a multiline component beside of the combotree and put the selected values into this multiline component when users select a tree node.
Here is the simple example:
Code:
<div style="position:relative">
<textarea id="ta" readonly style="position:absolute;left:0;top:0;width:176px"></textarea>
<select id="c2" class="easyui-combotree" name="language" data-options="onCheck:onCheck,url:'tree_data.json',cascadeCheck:false" multiple style="width:200px;"></select>
<script>
function onCheck(v){
var s = $('#c2').combotree('getText');
$('#ta').text(s);
}
</script>
</div>


Title: Re: Higher ComboTree to render visible all checked options
Post by: catasoft on October 16, 2012, 01:53:24 AM
Thanks,
what I was looking for was something more like a Tag list, where tags could be selected from a Combotree, so basically while checking boxes, tags would appear in the list, and unchecking would delete them.
BUT, at the same time, if not opened, the dropdown list of checkboxes/tags would not be visible.