I started using WEBIX and tried to use jsarray, with the component datatable.
When using jsarray format, it’s not possible to update the data on the datatable.
Only the first data is show.
Look this sample please:
var array1 = [ [1,"Filipe","Oporto"],[2,"David","NY"],[3,"Marie","Paris"] ];
var array2 = [ [4,"John","London"],[5,"Joana","Lisbon"],[6,"Pablo","Madrid"],[7,"Peter","LA"] ];
webix.ui({
view:"button",
label:"test new data",
click: function() {
new_data()
}
});
webix.ui({
view:"datatable",
id: "mytable",
columns:[
{id:"data0", header:"ID" },
{id:"data1", header:"Name" },
{id:"data2", header:"City" }
],
datatype: "jsarray",
data: array1
});
function new_data () {
var mytable = $$("mytable");
mytable.parse(array2);
}
When button is pressed, 4 new empty lines appear in the table, without data.