add

adds an item to the store

id add(object obj, [number index] );
obj
objectthe item object index
numberthe item position
idthe item id

Example

function addData() {
    $$("data").add({
        title: document.getElementById("title").value,
        year: document.getElementById("year").value
    },0)
}

Related samples

Details

Object can contain any properties:

$$('mygrid').add({
  some:"some string",
  other:123,
  complex:{
    contain:"any",
    content:"inside"
  }
}, 0);
See also
  • API
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
    If you have not checked yet, be sure to visit site of our main product Webix html5 framework and page of javascript custom context menu product.