When Click tree of accord, it will show data in grid!

Hi everyone,

I have the layout of 2U, cell a is a menu(left hand side), cell b is the detail(right hand side).
The menu have 1 object, tree of Accord, and detail have a grid.
The problem is when I click the tree Item(left hand side), the detail(right hand side) will show the grid of data from MYSQL database. Now is not work. Could you anyone can help me.
Thank you.

The code has below:

	    dhxLayout = new dhtmlXLayoutObject("parentId", "2u");
	    dhxLayout.cells("a").hideHeader();
	    dhxLayout.cells("a").setWidth(180);
	    dhxAccord = dhxLayout.cells("a").attachAccordion();
	    dhxAccord.addItem("phonebook", "Phone Book");

                dhxLayout.cells("b").setText("Detail");
	    dhxGrid = dhxLayout.cells("b").attachGrid();
		    dhxGrid.setImagePath("dht/grid/codebase/imgs/");
		    dhxGrid.setSkin("dhx_skyblue");
		    dhxGrid.clearAll();

                tree = dhxAccord.cells("phonebook").attachTree();
	    tree.setSkin("dhx_skyblue");
	    tree.setImagePath("dht/tree/codebase/imgs/csh_vista/");
	    tree.loadXML("xml/phonebook-hk.xml");
	    tree.atachEvent(tonclick);
	    function tonclick(id){
			if(tree.getItemText(id) == hk){
			dhxGrid.loadXML("xml/hk-office/hk-all.xml");
			dhxGrid.init();
			}
		};

solved!!
thank you anyone.