parse

loads data to the component from an inline data source

void parse(string| object data,string type);

Parameters

datastring| objectthe data to add
typestringthe data type: 'json' (default), 'xml', 'csv', 'jsarray'

Example

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");

Related samples

Details

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
});
See also
Back to top