addView

adds a new view to a layout-like widget or moves an existing one

string|number addView(object view, [number index] );
viewobjectthe configuration of the view
indexnumberthe index a new view will be added at or an existing one will be moved to
string|numberthe id of the view

Example

webix.ui({
    id:"mylayout",
    rows:[...]
});
// adds a template as a third cell to some existing layout
$$("mylayout").addView({ template:"New one" }, 2);
 
// moves an existing child view to a different index 
$$("mylayout").addView($$("child"), 3);

Related samples

Details

For this view, the index specified in addView() will have no visual effect since it displays one cell at a time. However, getChildViews() will return child views in the actual order.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix web control library and page of multi view product.