selectcell creating a new row

Hello
I have a routine that is called in start up and creates and selects the second column in the grid
function callOnce{
singleBlankLine.length=0;
singleBlankLine[0]=new Array();
for(i=0;i<mygrid.getColumnsNum();i++){
if(i==upcColNum){
singleBlankLine[0][i]="…";
}else{
singleBlankLine[0][i]="";
}
}
setTimeout(‘mygrid.selectCell(mygrid.getRowsNum()-1,upcColNum,true,false,true,true);’, 100);
setInterval(‘scanning()’,4000);
}
and establishes the interval whose only purpose is to repeatedly select the last line second cell. This is to reset focus in case errant mouse click
function scanning(){
mygrid.selectCell(mygrid.getRowsNum()-1,layout00.get(“upcColNum”),false,false,false,true);
}

The problem is it waits four seconds and it then actually ADDS lines. How is that? How can I stop that?

Unfortunately the issue is not clear.
Couldn’t you provide a more detailed sample of your code With screenshots of actual result and expected behavior.