How use addView()

webix.ui({
id:“somelayout”,
cols:[
{ id:“mytemplate1”,template:“aaa” },
{ id:“mytemplate2”,template:“bbb” },
{ id:“mytemplate3”,template:“ddd” }
]
})

var id = $$(“somelayout”).addView({
view:“button”, value:“new button”,
}, 1);

it don’t work.

Hi,

We can not reproduce the problem locally (tested in IE, Firefox and Chrome). Here is our test page:

<!DOCTYPE html>
<html>
   <head>
       <link rel="stylesheet" href="../../codebase/webix.css" type="text/css" media="screen" charset="utf-8">
       <script src="../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>
   </head>
   <body>
       <script type="text/javascript" charset="utf-8">
         webix.ui({ 
            id:"somelayout", 
            cols:[ 
                 { id:"mytemplate1",template:"aaa" }, 
                 { id:"mytemplate2",template:"bbb" }, 
                 { id:"mytemplate3",template:"ddd" }
            ] 
         });
         var id = $$("somelayout").addView({ 
                  view:"button", 
                  value:"new button"
          },1);
       </script>
   </body>
</html>