V421 Set a grid in tabbar

Hello,
new in dhtmlx , i try to attach a grid to a tabbar

I found some examples , but they do not work, i guess they were for version 2.X or 3.X, but not V421

Please Help

Philippe

Hello Philippe,

Take a look at this url
http://dhtmlx.com/docs/products/dhtmlxTabbar/samples/04_components/01_grid_inside.html

Hope this helps
Cemang

hello Cemang,
Thanks for your answer.

Ok for your link,i check the source and dhtmlx.js is a 4.2x version.
i find origin of my problem, when i have downloaded, i just download dttmlxTabbar and dhtmlxGrid, in the dhtmlxTabbar/codebase/dhtmlx.js there is no attachGrid method.
i have now downloaded dhtmlxDuite and in dhtmlxSuite/codebase/dhtmlx.js , there is the attachGrid method

Now i can attach a grid in tab… i mean no more js error… like this

myGrid = myTabbar.tabs(“a1”).attachGrid();
myGrid.setImagePath("…/…/…/codebase/imgs/");
myGrid.setHeader(“Time, Process, Message”);
myGrid.setInitWidths(“100,200,*”);
myGrid.setColAlign(“left,left,left”);

I try to load Local json data via mygrid.parse(data,“json”)

var rowId = 1;
var data = {rows:[ {id:rowId, data: [“10:45:30:123”,“Main Process”, “Main Program Start”]} ] };
mygrid.parse(data,“json”);

and i get “cannot read property ‘appendChild’ of null” in dhtmlxGridObject._insertRowAt ???

Have you any ideas about this error
is there a debug dhtmlx.js version?

Thanks for your help

May be you forgot to call
mygrid.setColTypes method in your code?

Cemang

Hello Cemang

I found the solution, just neccesity to init the grid via myGrid.init()

and Everything OK for the While.

Thanks

Philippe