parse
loads data to the component from an inline data source
function parse( // the data to add data: promise|string|array|object, // the data type: 'json' (default), 'xml', 'csv', 'jsarray', "excel" (combined with "binary" proxy) type?: string, // if true, the current data are erased before new data are parsed clear?: boolean): void
Example
Section titled “Example”const grid = webix.grid({ ...});
const str = "<data><item id='1'><title>The Lord of the Rings</title>"+ "<year>2003</year></item>" + "<item id='2'><title>Star Wars: Episode V</title>"+ "<year>1980</year></item></data>";
grid.parse(str,"xml");
also check the next samples:
Details
Section titled “Details”The data parameter can have the following types:
- data promise (object),
- object of another data component,
- inline data:
- array
- string
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:
datagrid.parse({ // the number of records will be equal to the last index plus 1 pos: datagrid.count(), data:dataset});
See also
Section titled “See also”Articles
API