This is question is about dhtmlxgrid pro edition.
Currently I need a function that grid may perform update to database. In my opinion, this action should be triggered by the event onCellChanged(row_id, cell_index, new_data). So I over-write this method and setOnCellChanged(the_function) right before the loadXML method.
But it cause a trouble while loading XML content. Each cell that the loadXML method fill to the cell were treat as “changed cell”. I have found all the knowledge base for the solution but can’t find.
Would you plz give me some suggestion?
This is correct behavior , onCellChanged event called when setting data from XML ( this allow to create custom pre-formating rules )
You can
a) set event only after XML loading
var mygrid=new…
…
mygrid.loadXML(url,function(){
mygrid.attachEvent(“onCellChanged”,function(a,b,c){
…custom code here…
})
});
b) use onEditCell event , it fires each time cell edited by user
mygrid.attachEvent("onEditCell ",function(stage,b,c,d,e){
if (stage==2){ //edit end
…custom code here…
}
return true;
})