Loading tree table data on demand (click) from an external js module

I have the following webix treetable def which I would like to load the data from an event external to webix so I don’t want data to load automatically.

The data is loaded from a jquery ajax call in a module method and from that method (outside of the webix.ready) I want to cause the treetable to load that data - I read the data object operations page but cannot get my head around how to access the treetable to load the data

Any help would be great or a direction to look into

Thanks


webix.ready(function(){

	var actionGridClassObj = $('.action_grid');
	var grid = null;

	// init grid object
	var gridContainer = 'gridTree';
	var gridId = 'gridItems';
	var currItem = null;

	console.log('DEBUG: gridContainer: ', gridContainer);
	console.log('DEBUG: gridId: ', gridId);

	grid = new webix.ui({
		container: gridContainer,
		id: gridId,
		view:"treetable",
		headerRowHeight:20,
		rowHeight:32,
		select:"row",
		scrollX:true,
		scrollY:true,
		editable:true,
		editaction:"dblclick",
		columns:[
			{ id:"id", header:"Id", css:{"text-align":"center"}, width:50},
			{ id:"status", header:"Status", css:{"text-align":"center"}, width:80},
			{ id:"action", header:"Action Items", editor:"text", width:480, template:"{common.space()}{common.icon()} #value#", fillspace:1},
			{ id:"due",	header:"Due", editor:"text", width:100}
		],
		autoheight:false,
		autowidth:false,
		data: HLF.actions.actionItems
	});

. . .

You can load data to a tree at any moment you’d like using different methods.

tree.load("someurl.php"); 

webix.ajax("someurl.php", function(text,data){
    tree.parse(data.json);
});

And even (provided that you’ve upgraded to 2.0):

tree.parse( webix.ajax("someurl.php"));

The second parameter of load and parse methods is the datatype (in case it is other than JSON.)

Some useful docs:

tree.parse did the trick - showing how to do it with the webix ajax was the ticket I needed!

Thanks so much!