Categories | Question details Back To List | ||||||||
problem with dataprocessor and delete hi, i'm using a DataProcessor to link a dhtmlgrid and a database's table. It works just fine with inserts and updates, but i can't manage to make it work with delete. The page where the grid is shown is like this : mygrid = new dhtmlXGridObject('mygrid_container'); ... myDataProcessor = new dataProcessor("update.php"); ... myDataProcessor.init(mygrid); function addRow(){ var newId = (new Date()).valueOf() mygrid.addRow(newId,"",mygrid.getRowsNum()) mygrid.selectRow(mygrid.getRowIndex(newId),false,false,true); } function removeRow(){ var selId = mygrid.getSelectedId() mygrid.deleteRow(selId); } with update.php like this : if(isset($_GET["!nativeeditor_status"]) && trim($_GET["!nativeeditor_status"])=="inserted"){ //INSERT in base ... $action = "insert"; }else if(isset($_GET["!nativeeditor_status"]) && $_GET["!nativeeditor_status"]=="deleted"){ //DELETE in base ... $action = "delete"; }else{ //UPDATE in base ... $action = "update"; } is there somthing wrong with my code ? where could i find a complete exemple of a dataprocessor working ? I could only find partial exemples at the page http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/dataprocessor/savedata_grid.html Any help would be greatly appreciated ! Answer posted by Support on Apr 27, 2009 08:04 Extended set of samples attached to the post. But there is no any special code necessary to process "delete" operations. The code which you are using currently must be enough. You can try to include dhtmlxdataprocessor_debug.js in addition to existing files - it will show full log of all client side operation and exact responses. If issue still occurs - please provide client side log for problematic case and some description - which kind of error occurs for delete operation. Attachments (1)
|