I have a working tree using smart rendering. There is a modal window in my app that creates a new entry in the database that I’d like the tree to display after insertion. Here is what works and what doesn’t:
tree.openItemsDynamic( resobj.matches, true ); <--- WORKS
tree.selectItem( resobj.last ); <--- WORKS
tree.focusItem( resobj.last ); <--- DOES NOT SCROLL TO FOCUSED ITEM
Here’s the tree definition:
[code]tree = new dhtmlXTreeObject( ‘tree_div’, ‘100%’, ‘100’, 0 );
tree.setImagePath(“/api/dhtmlx/dhtmlxTree/codebase/imgs/csh_winstyle/”);
tree.setSkin(‘dhx_skyblue’);
tree.enableSmartRendering(true);
tree.attachEvent( “onSelect”, function(id,ind){ cpe_detail(id); });
tree.setXMLAutoLoading(“status_connector.php”);
tree.loadXML(“status_connector.php”);
#tree_div {
border: 1px solid #FFFFFF;
height: 100%;
width: 450px;
overflow-y: auto;
overflow-x: hidden;
}
#info {
width: 450px;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}[/code]
Is there something I’m doing wrong that you can see?
Thank you,
John