I try to display a view which contain a datatable but I succeed displaying data in my datatable only, and only if I scroll. Nevertheless, if I don’t scroll data doesn’t appear; it’s quite odd. Have you any idea where the problem comes from ? Display problem appear in grid2
it’s just a datatable, nothing more which calls and ajax request like this :
var datatable = {
id : "datatable",
header : "title",
body : {
id:"datatablegrid",
view:"datatable",
select:"row",
resizeColumn:true,
resizeRow:true,
width:"100",
columns:[
{ id:"data1", header:"data1", adjust:true, width:80, maxWidth:250},
{ id:"data2", header:"data2", adjust:true, width:80, maxWidth:250},
{ id:"data3", header:"data3", adjust:true, width:80, maxWidth:250},
{ id:"data4", header:"data4", adjust:true, width:80, maxWidth:250},
],
on: {
"onItemClick" : function(id) {
var data = this.getItem(data).data;
webix.ajax().get("/mysite/"+data+"/news", function(text, data) {
if(isEmpty(text) == false){
$$("Grid2").clearAll();
$$("Grid2").load("");
$$("Grid2container").refresh();
}
}
});
}
}
},
};
var Grid2 = {
id : “Grid2container”,
view : "accordionitem",
header : "title2",
body : {
id:"Grid2
view:"datatable",
select:"row",
width:"100",
columns:[
{ id:"data1", header:"data1", adjust:true, width:80, maxWidth:250},
{ id:"data2", header:"data2", adjust:true, width:80, maxWidth:250},
{ id:"data3", header:"data3", adjust:true, width:80, maxWidth:250},
{ id:"data4", header:"data4", adjust:true, width:80, maxWidth:250},
]
}
};
thank you in advance