TreeTable Giving Exception

Hello Maksim,

I am using TreeTable and and doing update on the tree for one of the Row, but when I am doing in the below code, the code will throw an error and the control goes to this line in webix.js(Using debug JS)

var toporder = this.branch[parent];

this shows parent=true
and this.branch[parent]=undefind

First Exception comes in Catch -
First Time thowing from :
this.data.ungroup(true);
this.data.group(config);

Message : “Unable to get property ‘length’ of undefined or null reference”
Stack : "TypeError: Unable to get property ‘length’ of undefined or null reference
at _ungroup_tree
number : -2146823281

and the message comes like can not fine length of undefined, but again when the contole goes to Catch block this will start working.
I would request you please suggest me, what I can change so that this will work in first attempt.

 try{
		

            var serialize_treeData1 = global_root.$$("treeId").serialize();
	     console.log("serialize_treeData AFTER"+JSON.stringify(serialize_treeData1));	
	     root.$$("treeId").ungroup();	
             root.$$("treeId").refresh();
	     console.log("parent node "+JSON.stringify(parentNode));
	     global_root.$$("treeId").group({by:"group"});
	     global_root.$$("treeId").openAll();
 }catch(e){
		 try{
			 global_root.$$("treeId").group({by:"group"});
			 global_root.$$("treeId").openAll();
		 }catch(e1){
			 global_root.$$("treeId").group({by:"group"});
			 global_root.$$("treeId").openAll();
		 }
		 
			
	 }

Can some one please help me to come out of this problem,

I can confirm issue, fix will be included in the oncoming Webix 2.1

As quick workaround, use ungroup without parameters

this one

this.data.ungroup(); 

instead of

this.data.ungroup(true); 

Hello Maksim,

I you see the above code, I am using root.$$(“treeId”).ungroup(); , only without any parameter.

First Exception comes in Catch - First Time thowing from : this.data.ungroup(true); 

This is from your original post.
I can’t reconstruct issue when using ungroup without parameters, but exactly the same error occurs for me, when ungroup called with some parameter.

Anyway - please grab Webix 2.1 and check is issue still occurs or not.
http://webix.com/download-webix-gpl/