Categories | Question details Back To List | ||
problem during deleting a row Hi, I am using dhtml DataProcessor, I am trying to delete a row and saving the changes I am getting the following error message: Error: '_childIndexes' is null or not an object File: dhtmlxgrid.js Line: dhtmlXGridObject.prototype={ ... cells:function(row_id, col){.. var cell = (c._childIndexes ? c.childNodes[c._childIndexes[col]] : c.childNodes[col]); This was came while 1) first I deleted the row from the grid using following function function deleteRow(abcd) { if(confirm("Are you sure you want to delete row"+abcd)){ mygrid.deleteSelectedItem(); } Then the row was Scratched in grid. 2) I am trying to save the changes using SAVE button, I am getting the error. Grid Initialization Code: if(typeof(mygrid) == "undefined"){ mygrid = new dhtmlXGridObject('gridbox'); mygrid.setHeader(levelHeader); mygrid.attachHeader(header); mygrid.setColumnIds(columnIds); // here the ID's of columns need to be set mygrid.setInitWidths(intiWidths); mygrid.setColTypes(colTypes); mygrid.setColSorting(colSorting); mygrid.setImagePath("images/treeImgs/"); mygrid.setSkin("xp"); // moved before setAwaitedRowHeight mygrid.enableSmartRendering(true); mygrid.setAwaitedRowHeight(25); mygrid.setEditable(mygrid.isEditable); mygrid.init(); //function called when editing of a cell mygrid.attachEvent("onEditCell",function(stage,id,ind,value){ if (stage==2) { var type = mygrid.fldSort[ind]; var columnId = mygrid.getColumnId(ind); if (!some_check(value,type,columnId)) { alert("incorrect data"); return false; } } return true; }) mygrid.attachEvent("onXLS",function(){ //show loading message here document.getElementById('message').style.display='block'; }) mygrid.attachEvent("onXLE",function(){ //hide loading message here document.getElementById('message').style.display='none'; }) mygrid.clearAll(); //before loading set cursor to default document.body.style.cursor='default'; mygrid.loadXML('fetchGridData.do?methodName=loadGrid&prm1='+param1+'&prm2='+param2); //============================================================================================ myDataProcessor = new dataProcessor('fetchGridData.do?methodName=loadGrid&prm1='+param1+'&prm2='+param2); myDataProcessor.enableDebug(true); myDataProcessor.enableDataNames(true); myDataProcessor.setUpdateMode("off");//available values: cell (default), row, off myDataProcessor.defineAction("error",myErrorHandler); myDataProcessor.defineAction("insert",setUserDataFunction); myDataProcessor.defineAction("delete",setDleteFunction); myDataProcessor.defineAction("update",setUserDataFunction); myDataProcessor.setTransactionMode("POST",true); myDataProcessor.init(mygrid); setGlobalUserData(colNullable); } /Thanks Raj Answer posted by Support on Jun 05, 2008 08:43 The original reason of the error - the some API call was executed against not existing row. The issue may be caused by incorrect response from dataprocessor - it may be incorrect @sid or @tid value in response. It hard to suggest anything without ability to reconstruct the problem - if it still occurs for you - please provide any kind of demo link , where issue can be reconstructed ( you can send details to support@dhtmlx.com ) |