Please explain why calling ‘cells’ method inside an event/function produces the expected result
myGrid.attachEvent('onRowSelect', function(id,ind){
//returns selected row id (e.g. 1001) and cell index (e.g. 3)
var myCell = myGrid.cells(id,ind).getValue();
console.log(myCell);// returns selected cell value
});
Yet, when used alone and provided the same parameters manually it errors?
var myCell = myGrid.cells(1001,3).getValue();
console.log(myCell);
// returns error "Cannot read property '_childIndexes' of null
// dhtmlxGridObject.cells @ dhtmlx.js:9
// anonymous function @ griddemo.html:53
Thank you