Attaching a div to a layout and a grid to the div

Folks,

I am trying to display a grid inside of a div, and the div is attached to a layout. I keep getting an error in the javascript console:

TypeError: b.nodeName is undefined.

The code looks something like this:

var layout = new dhtmlXLayoutObject(“smMenuTarget”, “2U”, “dhx_skyblue”);
:
var gdiv = document.createElement(‘div’);
var grid = new dhtmlXGridObject(gdiv);
:
var pdiv = document.createElement(‘div’);
pdiv.innerHTML = ’ ';
layout.cells(“b”).attachObject(logEntriesPagingInfoDiv);
:
grid.enablePaging(true, 50, 10, “pagingArea”, true, “infoArea”);
grid.init();
grid.enableSmartRendering(true, 100);
:
layout.cells(“b”).attachObject(gdiv);

Any help would be greatly appreciated.

Thanks,

Daryl

Here you can find a tutorial about attaching grid with paging to layout:
docs.dhtmlx.com/doku.php?id=dhtm … components

Note: paging and smart rendering functionalities are incompatible. You need to use smart rendering or paging.