TypeError: this.vs[this.av].form.setSizes is not a function

Hi,
i have an issue with form loading in different views of cell.

i have a layout cell a.
In default view im loading new employee form.
in cell.view(‘edit’) i am loading editemployee form by making this view active.

sometimes am getting this error in console what wil be the problem?

this.obj.updateNestedObjects=function(){
this.vs[this.av].grid&&this.vs[this.av].grid.setSizes();
this.vs[this.av].sched&&this.vs[this.av].sched.setSizes();
this.vs[this.av].tabbar&&this.vs[this.av].tabbar.adjustOuterSize();
this.vs[this.av].folders&&this.vs[this.av].folders.setSizes();
this.vs[this.av].editor&&(_isIE||this.vs[this.av].editor._prepareContent(!0),this.vs[this.av].editor.setSizes());
if(this.vs[this.av].layout)(this.vs[this.av].dhxcont._isAcc||this.vs[this.av].dhxcont._isTabbarCell)&&
this.vs[this.av].dhxcont.skin==“dhx_skyblue”?(this.vs[this.av].layoutObj.style.width=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.width)+2+“px”,this.vs[this.av].layoutObj.style.height=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.height)+2+“px”):(this.vs[this.av].layoutObj.style.width=this.vs[this.av].dhxcont.mainCont[this.av].style.width,this.vs[this.av].layoutObj.style.height=this.vs[this.av].dhxcont.mainCont[this.av].style.height),this.vs[this.av].layout.setSizes();
if(this.vs[this.av].accordion!=
null)this.skin==“dhx_web”?(this.vs[this.av].accordionObj.style.width=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.width)+“px”,this.vs[this.av].accordionObj.style.height=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.height)+“px”):(this.vs[this.av].accordionObj.style.width=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.width)+2+“px”,this.vs[this.av].accordionObj.style.height=parseInt(this.vs[this.av].dhxcont.mainCont[this.av].style.height)+2+“px”),this.vs[this.av].accordion.setSizes();
this.vs[this.av].dockedCell&&this.vs[this.av].dockedCell.updateNestedObjects();
this.vs[this.av].form&&this.vs[this.av].form.setSizes()
};

TypeError: this.vs[this.av].form.setSizes is not a function

Hi
There is not enough of data. Could you provide completed demo to reproduce the issue?
docs.dhtmlx.com/doku.php?id=othe … leted_demo

I don’t know if this helps, but I get the same error when calling the unload function of the dhtmlxForm object. My form is attached (using the attachForm function) in a layout cell. When I call the unload function I get the typeError.

Apologies for highjacking the thread. Hope this helps in a way.

It really helps. If you can provide completed demo, we can see your code, your logic etc.
We are often ask for demos - in this case we can answer you in detail with using exactly YOUR code, not common сases.

Attaching a code sample is not easy for me at the moment, but I am using the dhtmlx v3.5 pro suite (full web skin).
The code is really as simple as

myForm = myLayout.cells(“a”).attachForm(myFormJson);

the form is drawn correctly and works as expected.
On some event, I call the unload function and I get the TypeError message.
If I do not call the unload function and simply set

myForm = null;

everything works fine.

You can share with us a direct link on support@dhtmlx.com
Note: add a link to this topic

Unfortunately the support period has expired.

You can simply send us email. You may not create a ticket.