addView

adds a new view to a layout-like widget

string|number addView(object view, [number index] );

Parameters

viewobjectthe configuration of the new view
indexnumberthe index a new view will be added at

Returns

string|numberthe id of the new view

Example

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

Related samples

Details

The method works for layout rows and cols, multiview cells, accordion and carousel panels, toolbar and form controls.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript website framework and page of javascript portlet product.