PDA

View Full Version : Internet explorer tree node expand problem



mcadirci
17 Dec 2010, 1:34 AM
Hello,

I have a tree that appends its node elements to tree root when it is going to be displayed.

I have smt like


function expandNodeStack( commonGroup, stack, depth ){
if( ! stack || stack.length == depth) return;
var group = commonGroup.find(stack[depth]);
if( stack.length == depth + 1 ){
group.nodeElement.select();
Ext.getCmp('plateSearchField').focus();
}
else{
group.nodeElement.expand();
}
expandNodeStack( group, stack, depth + 1 );
}
function expandNode( nodeToExpand ){
var group = searchCommonGroupForNode(companyNodes,nodeToExpand.attributes.nodeId);
if( group.expandedBefore != true ){
nodeToExpand.removeAll();
if( group.searchMode != true ){
for( var i = 0 ; i < group.subGroups.length ; i ++ ){
appendNode(nodeToExpand, group.subGroups[i], true);
}
group.expandedBefore = true;
}else{
for( var i = 0 ; i < group.subGroups.length ; i ++ ){
if( group.subGroups[i].visible != false )
appendNode(nodeToExpand, group.subGroups[i], true);
}
}
}
}
But this code does'nt work on IE. I have errors like

>>group.nodeElement.expand();
'this.ownerTree', null veya bir nesne de?il
'insertAdjacentHTML', null veya bir nesne de?il

>>group.nodeElement.expand();
'this.ownerTree', null or not an object
'insertAdjacentHTML', null or not an object

Any ideas?

Thanks.

mcadirci
17 Dec 2010, 4:02 AM
Hello,

I have found the solution and like to add it here:

I hold the node element at group object's nodeElement. Some how nodeElement changed at IE I remap the nodes before the expand each time @IE now.


Thanks.