Hi all,
have a grid and fill it with data from Json. That works great also the sorting, but I can’t select any row or edit any cell. what do I wrong???
function doInitGrid(){
mygrid = new dhtmlXGridObject(‘mygrid_container’);
mygrid.setImagePath(“includes/codebase/imgs/”);
mygrid.setHeader(“Seitenname,CSS Pfad, Erstellt, Ge�ndert”);
mygrid.setColTypes(“txt,txt,ro,ro”);
mygrid.setInitWidths(",,180,180");
mygrid.setColAlign(“left,left,center,center”);
mygrid.setColSorting(“str,str,date,date”);
mygrid.enableMultiline(true)
mygrid.setSkin(“light”);
mygrid.init();
mygrid.load(“includes/dataconnector/getSites.php”,“json”);
}
Most probably problem caused by missed rows ID in json data, please be sure that each row has unique ID
mygrid.parse({
rows:[
{id:1, data:[“1”,“2”,“3”,“4”]},
{id:2, data:[“5”,“6”,“7”,“8”]}
]
},“json”);
Ok thank you. That was it! Now it works.
Thank you very much!!!