add
adds an item to the store
function add( // the item object obj: object, // the item position index?: number): id
Returns
Section titled “Returns”id
the item id
Example
Section titled “Example”function addData() { grid.add({ title: document.getElementById("title").value, year: document.getElementById("year").value },0)}
also check the next samples:
Details
Section titled “Details”Object can contain any properties:
mygrid.add({ some:"some string", other:123, complex:{ contain:"any", content:"inside" }}, 0);