add

adds an item to a component

void add(object config,number index,string parent);

Parameters

configobjectthe configuration of the added item
indexnumberdefines the position of the item in the component
parentstringthe ID of the future parent item

Example

myToolbar.data.add({
    type:"button",
    icon:"dxi-plus",
    value:"New"
},1);

Back to top