gorm
05-18-2003, 12:00 PM
I am trying to change the behavior of a datagrid..enabling static header and footer with scrolling item/alternateitem.
I ended up with a control that created the following html (first table is the header and I copy style position information from datagridtable to the div.
My problem is how could I sync the table layout of the two tables (each column in the first table should be as wide as the widest column in the second table). Do I need to use javascript or is it possible to do this some way in HTML?
<div style="LEFT:265px;TOP:169px;POSITION:absolute;">
<table style="border-collapse:collapse;">
<tr>
<td>test1</td><td>test</td>
</tr>
</table><table cellspacing="0" rules="all" border="1" id="HeaderGrid1" style="border-collapse:collapse;Z-INDEX:101;">
<tr>
<td>test</td><td>test</td>
</tr>
</table>
</div>
I ended up with a control that created the following html (first table is the header and I copy style position information from datagridtable to the div.
My problem is how could I sync the table layout of the two tables (each column in the first table should be as wide as the widest column in the second table). Do I need to use javascript or is it possible to do this some way in HTML?
<div style="LEFT:265px;TOP:169px;POSITION:absolute;">
<table style="border-collapse:collapse;">
<tr>
<td>test1</td><td>test</td>
</tr>
</table><table cellspacing="0" rules="all" border="1" id="HeaderGrid1" style="border-collapse:collapse;Z-INDEX:101;">
<tr>
<td>test</td><td>test</td>
</tr>
</table>
</div>