getElementById fails for cells scrolled off screen
If I do the following:
I get the HTML I would expect for the first cell of the first row.
If I now do the following:
where the row index is now scrolled off screen (ie row 10), I get a javascript error telling me 'object required'.
ie, cell is null because the element with the id 'MyGrid-cell-0-10' could not be found. Yet, when I look at the DOM in full, the id is clearly there.
This happens when I am refreshing the grid. Its possible I may just need to get the grid to bring that element on screen first.
Any ideas?
var cell = document.getElementById('MyGrid-cell-0-0');
alert (cell.innerHTML);
I get the HTML I would expect for the first cell of the first row.
If I now do the following:
var cell = document.getElementById('MyGrid-cell-0-10');
alert (cell.innerHTML);
where the row index is now scrolled off screen (ie row 10), I get a javascript error telling me 'object required'.
ie, cell is null because the element with the id 'MyGrid-cell-0-10' could not be found. Yet, when I look at the DOM in full, the id is clearly there.
This happens when I am refreshing the grid. Its possible I may just need to get the grid to bring that element on screen first.
Any ideas?
Mark
April 10,