removeView

hi,

maybe I try do do something impossible with webix framework but I stay on this issue for a long time …

If I have a view, i can remove elements in this view thanks to removeView attribute like this :

webix.ui({
id:“mylayout”
cols:[
{ id:“mytemplate1” },
{ id:“mytemplate2” },
{ id:“mytemplate3” }
]
})

$$(“mylayout”).removeView(“mytemplate2”); //it’s work well !

but now I have two views :

webix.ui({
id:“mylayout1”
cols:[
{ id:“mytemplate11” },
{ id:“mytemplate21” },
{ id:“mytemplate31” }
]
})

webix.ui({
id:“mylayout2”
cols:[
{ id:“mytemplate12” },
{ id:“mytemplate22” },
{ id:“mytemplate32” }
]
})

$$(“mylayout2”).removeView(“mytemplate21”); //doesn’t work

any solutions ?

in fact we can’t remove an element from an another view, we have to access to the child. are they possibilities to get arround this problem ?

I think you can use code like follows

var view = $$("mytemplate21");
view.getParentView().removeView(view)