Hi,
I tried to put igTree object in a div classed as accordion with JQueryUI 1.10.2, but I got a bad behavior.Tree is created right and it is correctly rendered if I lay it at the root level, but:
Do you think is it possible to change something to rendere igTree better?
Thanks
Flavio
Hi Flavio,
Could you provide us with a small html page reproducing the issue?
Thanks!
download TreeAndAccordion.zip at this link.
You will have only one controller, Tree, and one View, Index. Project already strats from Tree Url and reproduce the issue. In the view you can try to comment/uncomment the script section to see different behavior of treeModel (without accordion OK, with accordion code is reproduced instead the tree).
Thanks for your effort,
Flavio M.
Hi again,
I looked at your sample and this is definitely an issue with how the jQuery UI Accordion handles the markup it receives. I managed to get the tree to display, however the accordion still disregards the height of the content and it shows a small content holder with scrollbar. Here's what I did:
<h2>Tree and Accordion</h2>
@Html.Infragistics().Tree(Model)
<div id="divAccordion">
<h3>Accordion Title</h3>
<div></div>
</div>
<script>
$(function () {
$('#tree_1').appendTo('#divAccordion > div:first');
$("#divAccordion").accordion({
collapsible:true
});
</script>
sorry for the late answer.
I put heightStyle: "content" on the accordion definition and it solved the problem of the scrollbar.Now I am perfectly rendering 2 trees in an accordion and expand-collapse them does not create problems ;-)
Thanks again
Hey Flavio,
I am glad that I was able to help!