How to make this.getItem(id) work for treetable instead of a datatable?

Hi,

I was using datatable to display a data set. In some cases, my data set may change so I changed from datatable to treetable.

However, earlier this.getItem(id) was working for datatable when used as below:

scheme:{
    $init: function(row){      
      console.log("this.getitem = "+JSON.stringify(this.getItem(row.id )) ;     
    }
}

In this example, the data set does not have any tree structure, so I am not using common.treetable() function for any of the columns.

But based on instances, I will have data set which are either simple like this example or tree structured, that is why I am using view:treetable.

Now, how can I make this.getItem(id ) work for treetable, currently it is returning undefined.

Snippet: https://snippet.webix.com/1yshhsmg

Thanks.

why are you trying to use getItem in scheme->$init?
event if succeeded it will return the same object as row argument.

Hi intregal,

While rendering, I have to alter certain column values as :

this.getItem(id)[‘name’] = row.Name + “Something” ;

This will happen based on certain other conditions purely related to the application requirement.

So, I need it.

Thanks.

then use row['name'] = row.Name + "Something";

Thanks,
is there any reason why this.getItem(id)[‘name’] should return undefined.
I have used this for several other purposes as well.
Am I doing anything wrong here ?