The grid cell method setDisabled() errors when used in a for

Hi,

I am using myGrid.cellByIndex(rowId, 2).setDisabled(true) for disabling a cell, however I am unable to use it in a forEachRow() method like so:

myGrid.forEachRow(function(rowId){
  myGrid.cellByIndex(rowId, 2).setDisabled(true);
})

I get the following error:

Error: c.childNodes is undefined
Source File: dev1.dataproservices.co.uk:83/3r … /dhtmlx.js
Line: 977

How can I disable all cells in a column please?

Thanks,

Martin

Iterator provides row ID as parameter, not row index
The correct code will be
myGrid.forEachRow(function(rowId){
myGrid.cellById(rowId, 2).setDisabled(true);
})