Thanks, it works
on: {
onDataRequest: function (id) {
this.parse(
webix.ajax().get("data.php?parent="+id+"&level="??).then(function (data) {
return data = data.json();
})
);
return false;
}
}
How could I pass the level parameter to my script php? I really need this parameter because I have a dynamic hierarchy too. For example, the default hierarchy is l1 → l2 → l3, but user could change it and put l1 → l3 → l2. Therefore, I need to know what level it is to pass to my php script the name of the next level (that will be determined with a search in an array at same position of the level).
I got it!
var grid = webix.ui({
container: id,
...,
on: {
onDataRequest: function (id) {
console.log(grid.getItem(id));
....
It’s the way that I got it. Is it the right way?