AttachObject

Hello,

I am trying to create grids dynamically just using the dhtmlXGrid() constructor, then based on a filter menu item, attach those grids to a layout cell. My method for this is displayed below:

var newStackDiv = document.createElement(‘div’);
thisGrid.attachToObject(newStackDiv);
leftBlockLayout.cells(cellId.charAt(i)).attachObject(newStackDiv);

This is attaching the grid just fine, but the sizing is terrible and I cannot see all of the data displayed in the grid. I have tried setting the height of the object before and after the above block of code, but this does nothing to the size of the grid. Using firebug I inspected the div element and found that the sizing didn’t change. Is there a better/more proper way of doing this?

Thank you,

Kameron

Hello,

it would be more correct to use leftBlockLayout.cells(cellId.charAt(i)).attachGrid()

Please have a look the sample:
dhtmlxLayout/samples/04_components/02_grid.html