loads data to the component from an inline data source
data | string| object | the data to add |
type | string | the data type: 'json' (default), 'xml', 'csv', 'jsarray' |
webix.ui({
id:"data",
view:"dataview",
...
});
var str = "<data><item id='1'><title>The Lord of the Rings</title><year>2003</year></item>";
str += "<item id='2'><title>Star Wars: Episode V</title><year>1980</year></item></data>";
$$("data").parse(str,"xml");
If you want to parse data in addition to the existing dataset, specify position of parsing, namely the index from which you insert new data:
$$("datatable").parse({
pos: $$("datatable").count(), //number of records will be right the last index +1
data:dataset
});
Back to top