Layout - Tabber - Grid

Hello Friends,

I want to load tabber in layout and grid in tabs. Below is my code, I am able to load tabs in layout but I am not able to load grid in the tabs which are in layout. Below is my code, please help me, I would be very greatful.

	var dhxLayout = new dhtmlXLayoutObject("managePanels", "3L");
	dhxLayout.cells("a").setWidth(280);
	dhxLayout.cells("c").setHeight(180);		

	
	dhxTabbar = dhxLayout.cells("b").attachTabbar();
	dhxTabbar.setImagePath("js/dhtmlx/dhtmlxTabbar/codebase/imgs/");
	dhxTabbar.loadXML("js/dhtmlx/common/tabbar.xml?etc=" + new Date().getTime());
	
	dhxGrid = dhxTabbar.cells("a1").attachGrid();
	dhxGrid.setImagePath("js/dhtmlx/dhtmlxGrid/codebase/imgs/");
	dhxGrid.loadXML("js/dhtmlx/common/grid.xml?etc=" + new Date().getTime());

This is my code, its not working.

Thanks .

Hello,

loadXML loads data asynchronously. For this reason, you need to manipulate tabs id from the loading end handler:

dhxTabbar.loadXML(“js/dhtmlx/common/tabbar.xml?etc=” + new Date().getTime(),initGrid);

function initGrid(){
dhxGrid = dhxTabbar.cells(“a1”).attachGrid();
dhxGrid.setImagePath(“js/dhtmlx/dhtmlxGrid/codebase/imgs/”);
dhxGrid.loadXML(“js/dhtmlx/common/grid.xml?etc=” + new Date().getTime());
}