Line is visible but not able to spy

Hello,

I have a little problem with my dhtmlxgrid.

I have a grid with 7 lines. They appears on my HCI and when I do it :

alert("number of lines : " + dhtmlxGridHorizonCaf.getRowsNum());

it returns “7”.

My issue is : when I loop on the grid’s cells, the cells after the line 4 are not exists apparently.
If I do it :

// for each lines
for(var k = 0 ; k < dhtmlxGridHorizonCaf.getRowsNum(); k++){
		// for each column
		for (var i=0; i<dhtmlxGridHorizonCaf.getColumnCount(); i++){
			try{
				alert(dhtmlxGridHorizonCaf.cells(k,i).getValue());
			}
			catch(err)
			{
				alert("error at line : " + k + " column" + i);
				continue;
			}
		}  
	}

I have an error message from the five line to the last line.

Do you have an idea ? Thanks (and sorry for my bad english, I’m french).

Re-hello =D,

I resolved my issue. In fact, the line indice is not 0,1,…,n+1 but a id which is determinate but an other id (in my sample, the line indice is 1,2,3,4,10001,10002 because in my database, these are my table id)…

So, the solution is to loop on myGrid.getAllRowIds(...);

Thanks :wink: