Hi,
I have a problem with the treegrid component.
I have attached a listener to onRowMark event, so i can save the row after being edited.
It works only for the first row being edited, so only once and then it shows an empty alert even if i haven’t any alert anywhere. The server-side part is ok, but it is accessed only once. Below is the client-side code. Am i doing anything wrong?
var mygrid = new dhtmlXGridObject('gridbox');
mygrid.setHeader("Title,Est,Duration,PercentCompleted");
mygrid.attachHeader("#text_filter,#text_filter,#select_filter,#select_filter");
mygrid.setColumnIds("name,startdate,duration,progress");
mygrid.setInitWidths("*,*,*,*");
mygrid.setColAlign("left,left,left,left");
mygrid.setColTypes("tree,ed,ed,ed");
mygrid.setColSorting("str,str,int,str");
mygrid.enablePaging(true, 10, 5, "recinfoArea");
mygrid.setPagingSkin("bricks");
mygrid.enableSmartRendering(1);
mygrid.enableSmartXMLParsing(true);
mygrid.setMathRound(2);
mygrid.init();
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("modules/Project/dataGrid.xml");
var dp = new dataProcessor("index.php?module=Project&action=ProjectAjax&file=SaveListview");
dp.init(mygrid);
dp.setUpdateMode("row");
dp.enableDataNames(true);
dp.setTransactionMode("POST",true);
dp.attachEvent("onRowMark",function(rowId, cellInd, state){
if(state==true){
dp.setUpdated(rowId, true);
dp.sendData();
return true;
}
});
Thanks in advance!
Gilman.