Hello,
function onLoadGrid(){
grid = new dhtmlXGridObject('gridbox');
initGrid("/MRoad/web/js/dhtmlxSuite/dhtmlx_pro_full/imgs/", "/mroad/web/app.php/modele/grid-modele-groupe");
dp = new dataProcessor("/mroad/web/app.php/modele/action-dhtmlx/AmsModeleBundle:GroupeTournee");
initDataProcessor();
}
function initGrid(dhtmlx_img, path, selectedRowId) {
grid.setImagePath(dhtmlx_img);
grid.setSkin("dhx_skyblue");
grid.enableEditEvents(true, false, false);
grid.enableUndoRedo();
grid.init();
grid.loadXML(path,
function() {
if (selectedRowId)
grid.selectRowById(selectedRowId);
}
);
}
function initDataProcessor() {
dp.setTransactionMode("POST");
dp.enableDataNames(true);
dp.setUpdateMode("row");
dp.attachEvent("onAfterUpdate", function(id, action, tid, tag) {
return onAfterUpdateDataProcessor(id, action, tid, tag);
});
dp.init(grid);
}
function onAfterUpdateDataProcessor(id, action, tid, tag) {
switch (action) {
case "insert":
// dp.setUpdated(0,false);
// dp.setUpdated(tid,true);
break;
case "update":
if (tid) {
// dp.setUpdated(id, false);
grid.changeRowId(id, tid);
}
break;
case "delete":
if (tid) {
// dp.setUpdated(id, false);
grid.changeRowId(id, tid);
}
break;
case "error":
break;
dp.setUpdated(id);
}
return true;
}
function addRow(id) {
grid.addRow(0, initRow, 0);
grid.selectRowById(0);
}
After a row is inserted, when i update or delete another row, !nativeeditor_status is always equal to “inserted”.
If i uncomment dp.setUpdated(0,false); in onAfterUpdateDataProcessor(action=“insert”), !nativeeditor_status is blank.
What is wrong ?