Delete items before show


I have made a function for deleting items by user data value :

[code]tree.attachEvent("onXLE", function(id){
	var list = tree.getAllSubItems(0);
	var items = list.split(",");
	for(var i=0; i < items.length; i++){
		if (tree.getUserData(items[i],"VSB")=="No") {

The problem is that: It’s loading tree and after it delete items.
I want to delete it before showing the tree.
Is it possible :question:
Thanks for you help!


there is not onBeforeRender event in Tree. You may filter items on server and load xml without unnecessary nodes.

Ok, thank you for your help, i will try by this way.