hi,
i get the following error when resizing a grid cell after removing a grid object that has been attached to a layouts cell (that has been attached using layout.attachGrid() ). the grid is removed using the grid’s destructor() method.
the error is:
win.grid.setSizes is not a function
applications-dev.widder.at/inc/d … xlayout.js
Line 75
any idea how fix this?
regards,
alexander
Hello,
Please add the following code after grid removing:
dhxGrid = dhxLayout.cells(“a”).attachGrid();
…
dhxGrid.destructor();
// add
dhxLayout.cells(“a”).grid = null;
hi,
i still get the error. call stack is:
win.grid.setSizes is not a function
setText()()dhtmlxlayout.js (line 75)
setText()()dhtmlxlayout.js (line 75)
setText()()dhtmlxlayout.js (line 75)
setText()()dhtmlxlayout.js (line 75)
...
more detailed sourcecode:
function init()
...
mainLayout=new dhtmlXLayoutObject(document.body, '3W', 'dhx_black');
...
gridVar=mainLayout.cells('b').attachGrid();
...
function someFunction()
...
gridVar.destructor();
mainLayout.cells('b').grid = null;
mainLayout.cells('a').collapse(); --> ERROR HAPPENS WHEN THIS IS EXECUTED
mainLayout.cells('b').collapse();
mainLayout.cells('c').expand();
mainLayout.cells('b').collapse();
mainLayout.cells('c').expand();
regards
Alexander
Right, please try this:
gridVar.destructor();
mainLayout.cells(“b”).grid = null;
mainLayout.cells(“b”).window.grid = null;
PERFECT! WORKS!!!
thanks & regards,
alexander