Wrong value of cellIndex returned for a cell that has "display:none" style applied
Posted on 2005-05-15
I iterate over the cells in a row in html table , and check
for the cellIndex of each cell .
First cell (index:0 ) in the row has the "display:none" style .
For some reason (another cool and stupid feature ??? )
I get for this cell wrong value of cellIndex ( it's actually seems like it returns the last index in this row. For ex. if I have 3 cells in the row , then I get the value 2 for this cell )
For the second cell in the same row I get value of "0" , and for the last I get "1" .
So it seems that if a cell has "display:none" style applied , it's cellIndex property get the value of last index in the row.
When I remove the "display:none" style from the cell , I get the cellIndex values right . ( 0,1,2).
Though when I access the first cell ( even when it has "display:none" style)
using the oRow.cells , I get the right cell .
Mystery / Bug / (stupid) Feature ????