getting out of memory error in onCellChanged event handler

I’m getting out of memory and stack overflow errors in event handler that I wrote for onCellChanged event. My code goes as follows:

There are other functions as well but they are working fine. But there is some problem with doOnCellChangedBulk. It keeps on looping within this function and eventually gives out of memory and stack overflow errors. How can I return from this function?

Seems like in your function one else statement is missing

[code]function doOnCellChangedBulk(rId,cInd,nValue){
if(cInd==0 && nValue==“del”){
if((gridMain.cells(rId,cInd).getValue())== nValue){
document.getElementById(‘Delete’).style.display = ‘none’;
document.getElementById(‘UndoDelete’).style.display = ‘block’;

         else // add this 

if(!((gridMain.cells(rId,0).getValue())== “add” || (gridMain.cells(rId,0).getValue())== “del”) && allowUpdation==“true”){


Hi sematik,
we have implemented rows hiding features in grid, we encounter similar outofmemeory exception when hiding multiple rows based on some condition very frequently… i could not able to understand how else condition in the above code would avoid outOfMemory exception for this kind of issue… Please be little more specific about the problem and ur suggestion in this thread that would enable me to identify root cause of the issue i am encountering

we have wrongly called grid.sortRows() API in our case which caused this OutOfMemory exception