this.obj.firstChild is null error with Grid in Tabbar

using the sample code as a base I have the following :

<div id="a_tabbar" style="width:395px; height:390px;"> </div>
<script type="text/javascript" language="javascript">

tabbar = new dhtmlXTabBar("a_tabbar", "top");
tabbar.setSkin('modern');
tabbar.setImagePath("/imgs/");
tabbar.addTab("a1", "All Invoices", "100px");
tabbar.addTab("a2", "To Be Invoiced", "100px");
tabbar.addTab("a3", "Pending Payment", "100px");
tabbar.setTabActive("a1");
// grids
var grid1 = tabbar.cells("a1").attachGrid();
grid1.setImagePath("/imgs/");
grid1.setHeader("a,b,c,d,e,f,g,h,i,j");
grid1.setInitWidths("100,100,50,100,50,100,55,75,70,68");
grid1.setColAlign("left,left,left,left,left,center,right,center,center,left");
grid1.setColSorting("str,str,str,str,str,str,str,str,str,na");
grid1.loadXML("/manu/get/format/xml");


var grid2 = tabbar.cells("a2").attachGrid();
grid2.setImagePath("/imgs/");
grid2.loadXML("/data.xml");

var grid3 = tabbar.cells("a3").attachGrid();
grid3.setImagePath("/imgs/");
grid3.loadXML("/data.xml");

</script>

the grid1 in tabbar cell a1 is a direct copy and paste of an existing working grid code that I’m using elsewhere within the app - but used here it is generating an error and not rendering the grid:

this.obj.firstChild is null
dhtmlx.js
Line 929

Thoughts?

You’ve missed the init() method call:

[code]var grid1 = tabbar.cells(“a1”).attachGrid();
grid1.setImagePath("/imgs/");
grid1.setHeader(“a,b,c,d,e,f,g,h,i,j”);
grid1.setInitWidths(“100,100,50,100,50,100,55,75,70,68”);
grid1.setColAlign(“left,left,left,left,left,center,right,center,center,left”);
grid1.setColSorting(“str,str,str,str,str,str,str,str,str,na”);

grid1.init();

grid1.loadXML("/manu/get/format/xml");[/code]

ugh, yes I did, thanks for catching that