DhtmlxGrid(on edit cell doesn't work properly)

Hello,
I am using a pro edition for dhtmlxComponents

I have a grid loaded from an xml file.I am attaching a “row select” event to this grid and within this event i am attaching another event that is “onEditCell” which is executed once fist time, twice 2nd time,thrice the 3rd time and so on…

In on Edit cell event i am trying to edit a combo which is loaded from the same xml file as grid…

Sample Code

dhxGrid1.loadXML(some url);
dhxGrid1.attachEvent(“onRowSelect”, function(rId,cInd)
{
dhxGrid1.attachEvent(“onEditCell”, doOnEditCell);
if(cInd==3)
{
fileName = dhxGrid1.cells(rId,10).getValue();
rdIDVal = dhxGrid1.cells(rId,2).getValue();
id1 = dhxGrid.getSelectedId();
jpReqId = dhxGrid.cells(id1,1).getValue();
}
else{return;}

  some action...

}// On row select Closes

function doOnEditCell(stage,rowId,cellIndex,nValue,oValue)
{
if(cellIndex==13 && stage==2)
{
if(condn…)
{
alert(“Cannot update!!!”);
return;
}
else
{
// code to update…
return true;
}
}
}//Do On Edit Cell closes

which is executed once fist time, twice 2nd time,thrice the 3rd time and so on…
onEditCell event executes as many times as you attach it.
You can:

  1. attach “onEditCell” event outside “onRowSelecte” event handler
  2. detach “onEditCell” event with detachEvent(id) method
    docs.dhtmlx.com/doku.php?id=dhtm … _to_events