tags:

views:

180

answers:

1

Hi,

I'm trying to add a cell to a row but making other cells not visible moves the cell down in order. For example:

      var celltwo = row.insertCell(0);
      var cellthr = row.insertCell(0);
      var cellfr = row.insertCell(0);
      var cellfv = row.insertCell(0);
      var cell = row.insertCell(4);
      celltwo.style.display = 'none';
      cellthr.style.display = 'none';
      cellfr.style.display = 'none';
      cellfv.style.display = 'none';

This will put cell into the first column because setting the .style.display to 'none' will remove them. Is there a way to keep them there but not make visible in any way...borders,background,so forth?

Thanks

+2  A: 

Does cellfv.style.visibility = 'hidden'; give the effect you want?

nikmd23
Visibility -> hides item while maintaining it in document flow. Display -> hides and removes from document flow.
ajm
Well there are still outlines of the cells I entered. Doesn't look like there were hidden completely.
Bruce227