Sub Grid

This sample: http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/07_extended_modes/03_pro_subgrids.html shows how to create sub grid by loading data from XML file. My question is how do i accomplish the same thing by creating sub grid entirely in javascript(jsarray) and add it to main grid using addRow() function. It looks like:

var grid = new dhtmlXGridObject(parent_container);
grid.setColTypes("sub_row,ro,ro,ro");
grid.init();
......
var sub_grid = new dhtmlXGridObject(child_container);
sub_grid.setColTypes(ro,ro,ro);
sub_grid.init();
.....
grid.addRow(grid.getRowsNum(),
                       [sub_grid,data1,data2,data3 ]);

Can anyone help?

i guess current version only support loading from xml!!!