Hi,
I am using below code to color the cells of Grid1 based on value in Grid3 column everytime the form gets loaded. There are some 8840 rows in Grid3 and 260 in Grid1. Ideally the first FOR loop should execute for 8840 times but its only running till 2850 or something like that.

Code:
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}


addLoadEvent(function() {

CurrnumRows = AuditClient.Grid1.GetNumberRows();
LognumRows = AuditClient.Grid3.GetNumberRows();


for ( var countlog=0;countlog<=LognumRows ;countlog++)
{
//alert(countlog);
AuditClient.Grid3.GetCell(0,countlog);
var Identifier = AuditClient.Grid3.CellGetText;

      for (var countCurr=0;countCurr<=CurrnumRows;countCurr++)
          {

           AuditClient.Grid1.GetCell(3,countCurr);
           var IdentifierCurr = AuditClient.Grid1.CellGetText;

 	  if (Identifier == IdentifierCurr)
             {
	  AuditClient.Grid1.GetCell(3,countCurr);
               AuditClient.Grid1.CellSetBackColor(0xfbff00);
                AuditClient.Grid1.CellSetReadOnly(1);
                AuditClient.Grid1.SetCell(3,countCurr);
                AuditClient.Grid1.RedrawAll();
             }
      }
}

})
Is it some sort of limitation in Javascript or I am making some mistake in the code? Please suggest.


Thanks.
Anil