Hi All,
I was trying to send the updated grid data at once with the following code:
ListGrid = new dhtmlXGridObject(‘gridbox’);
ListGrid.setImagePath(“…”);
ListGrid.setHeader(“…”);
ListGrid.setColumnIds(“…”);
ListGrid.setInitWidths(“…”);
ListGrid.setColAlign(“…”);
ListGrid.setColSorting(“…”);
ListGrid.setColTypes(“…”);//mygrid.setColTypes(“ro,ro,ro”);
ListGrid.setSkin(“dhx_skyblue”);
ListGrid.init();
ListGrid.setColumnHidden(0,true);
ListGrid.enableSmartRendering(true, 200);
ListGridDP = new dataProcessor(“…”);
ListGridDP.setUpdateMode(“off”);
ListGridDP.setTransactionMode(“POST”);
ListGridDP.init(ListGrid);
//Need to manually set the row status as ‘updated’ otherwise this row will not be marked for sendAll()
ListGrid.attachEvent(“onEditCell”, function(stage,rId,cInd,nValue,oValue){
setUpdatedRowId(stage,rId);
});
}
function setUpdatedRowId(stage, rId){
if(stage==2){
ListGridDP.setUpdated(rId,true);
return true;
}
}
I tried by not manually calling setUpdatedRowId with the attachEvent. It did not any rows (I put some alert in the js and found that updateRows list was blank, though a few rows were updated.
When i attached the event as above with the handler , I got an error like this in the javascript debugger (IE):
‘this._methods.0’ is null or not an object
Anybody has any clue what is wrong here…
Thanks in advance…