Error on showView when changing from "1C" to "2U"

Hi,

I’ve been struggling with an error when changing from view ‘def’ with a layout pattern of “1C” to a view ‘deta’ with a layout pattern of “2U”.

inlyt = new dhtmlXLayoutObject(document.body,"1C");
inlyt.cells("a").showView('deta');
inlyt2 = inlyt.cells("a").attachLayout("2U");
frmServicio = setFormServicios(inlyt2.cells("a")); //simple attachForm
gdServicio = setGridServicios(inlyt2.cells("b")); //simple attachGrid

inlyt.cells("a").showView('def');

Everything there is fine, but when I do the following, on button click

inlyt.cells("a").showView('deta');

I get error
TypeError: this.dataObj.cdata[a] is undefined
…)}else{if(this.dataObj.conf.mode==“v”){var a=c;if(this.dataObj.cdata[a].conf.col…
(firebug’s error arrow points to “var a=c”)

Please help.

Hi
Try first to set views and then call them

Correct me if I’m wrong. On the second line when I put inlyt2.showView(‘deta’) i’m defining the view. And then I attach other components, and return to ‘def’ view. Is this the correct way to do it?

Hi

that’s correct, when layout in view of layout_cell here is an error. please send your dhtmlx.js to support@dhtmlx.com with link to this thread, I’ll add a fix.