Hi,
After the grid is editted and sent back to the dataprocessor, it can happen that no new entry was accepted. In this case:
function doInitGrid(){
mygrid = new dhtmlXGridObject('mygrid_container');
mygrid.setImagePath(“'.LINK_ROOT.'partners/Traffic Builders/Website images/dhtmlx_imgs/”);
mygrid.setHeader(“‘.$csv_headers.’”);
mygrid.setInitWidths(“,,,,,,*”);
mygrid.setColAlign(“left,left,left,left,left,left,left”);
//mygrid.enableCSVAutoID(true);
mygrid.attachEvent(“onEditCell”, doOnEditCell);
mygrid.setSkin(“ri”);
mygrid.setColSorting(“str,str,str,str,str,str,str”);
mygrid.setColTypes(“ro,ed,co,co,co,ed,ed”);
'.$js_sbv_dom_countries.'
'.$js_sbv_lang.'
'.$js_sbv_country.'
var width = $("#mygrid_container").parent().width();
$("#mygrid_container").css("width",width+"px");
mygrid.enablePaging(true,10,5,"recinfoAreaPaging",false,"stats");
mygrid.setPagingSkin("toolbar", "dhx_blue");
mygrid.init();
mygrid.setColumnHidden(0,true)
mygrid.csv.row = "\n";
mygrid.csv.cell = ";";
mygrid.setColumnIds("id,keyword,se_from,search_lang_in,search_lang_from,locations,active");
var csvstr = "'.str_replace("\"","\\\"",$csv_data).'";
mygrid.parse(csvstr,"csv");
//used just for demo purposes;
//============================================================================================;
myDataProcessor = new dataProcessor("dynamicBlocks/editKeywordUpdate.php?domain_id='.$_REQUEST["domain_id"].'");
//lock feed url;
myDataProcessor.setTransactionMode("POST", true);
//set mode as send-all-by-post;
myDataProcessor.setUpdateMode("off");
myDataProcessor.enableDataNames(true);
//Columns that can trigger an update
myDataProcessor.setDataColumns([true,true,true,true,true,true,true]);
//define the custom logics
//myDataProcessor.defineAction("save_error_tag",save_error);
myDataProcessor.defineAction("error", function(tag) {
myDataProcessor.setUpdated(0,true,"updated");
alert(tag.firstChild.nodeValue);
return true;
});
}
sents back a error xml message and this is also shown in an alert box. But after this aller im not able to update the grid again.
The dataprocessor myDataProcessor.sendData(); thinks nothing changed, even when I delete a row.
What can I do? Cause the row keeps being black and is not being updated.