Whats the problem in following code ??
for (var i=0; i<libTableGrid.getRowsNum(); i++)
var j = i+1;
I am getting c has no property in dhtmlxgrid.js.
Are you using grid in normal or srnd|paging mode? In second case accessing rows, by their index is not reliable, they can be accessed by IDs only.
Also problem can be caused by incorrect column type used in setColTypes command.