Hello kisianhsang,
I assume you would like to use the removeItem method as follows:
$('#jqxTree').jqxTree('removeItem', element);
In that case, you can do the following:
var items = $('#jqxTree').jqxTree('getItems'); // the items variable contains an array of all the items var firstElement = items[0].element; // items[i].element gets the element of the i-th item $('#jqxTree').jqxTree('removeItem', firstElement); // the element is removed
You may, however, need the items’ ids. You can get them this way:
var items = $('#jqxTree').jqxTree('getItems'); // the items variable contains an array of all the items var firstID = items[0].id; // items[i].id gets the id of the i-th item
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/