Click to See Complete Forum and Search --> : Display alters the column width


kopite
05-18-2003, 01:18 PM
I have x rows, and when I display them all they retain their original column widths (even though it is not specified)

e.g. a single row
document.getElementById(myTbl).rows[x].style.display= 'block';

..but when one or more of the rows is not displayed, then the column width of all the rows now on display is reduced to the size of the text per column. Can I control the width being reduced and thus retain the original width?

kopite
05-19-2003, 03:45 AM
Even though it is not set on the original row, am I able to ascertain what the width is of the columns? as then I would be able to set the column width explicitely when I determine which rows to display.

kopite
05-19-2003, 09:06 AM
I have used your suggestion, and it works to a certain extent.

But not where the table pixel width is less than the window pixel width, if the table is partially covered then I can use

document.getElementById(myTbl).rows[y].cells[y].style.width = document.getElementById(myTbl).rows[x].cells[y].offsetWidth;

if not then I have to adjust it for it to be aligned with its original setting, that is:

document.getElementById(myTbl).rows[y].cells[y].style.width = document.getElementById(myTbl).rows[x].cells[y].offsetWidth-5;

This latter workaround is not something that fills me with confidence and would wish to avoid if possible.