Dynamically Re-Order Columns
Here is some code to re-order columns is a regular HTML table.
Anyone want to try and do this for the grid?
I would, but work is keeping me very busy right now.
Anyone want to try and do this for the grid?
I would, but work is keeping me very busy right now.
<html>
<head>
<title>Table Dynamics - ReOrder Rows (Asc OR Desc) and Move Columns About
</title>
<style>
.bgred { color:white; background-color:#FF0000; }
.bggreen { color:white; background-color:#00FF00; }
.bgblue { color:white; background-color:#0000FF; }
.bgorange { color:white; background-color:#FFCC00; }
.bgyellow { color:white; background-color:#F0F020; }
</style>
<script language="jscript"></script>
</head>
<body onmouseup = " z=0; lay1.style.display='none'; setTimeout('BlurHead() ; ',100); "
onmousedown= " if (z==1) { lay1.style.display='' ; lay1.style.left=x; lay1.style.top=y; } "
>
<span style="font-family:Verdana;color:blue;size:10;">
Client-Side Dynamic tables<br>
(1) Press sort buttons to reverse sequence of rows in table.<br>
(2) Drag and drop column headers to move order of columns in table.<br>
<p>
Action will slow down for large tables and slower processors. <br>
</span>
<input id="hid_list1_order" type="text" value="asc" xstyle="width:0;" />
<input type="button" value="sort asc." onclick="reorder('list1', 'asc');" />
<input type="button" value="sort desc." onclick="reorder('list1', 'desc');" />
<table ID=TABL1 border=1 width=70%>
<thead ID="head1" style="background-color:#F0FFFF;">
<th colF=0
onmouseover=" MOV(this) ; " onmouseout =" MOT(this) ; "
onmousedown=" MDN(this) ; " onmouseup =" MUP(this) ; "
>Rights</th>
<th colF=1
onmouseover=" MOV(this) ; " onmouseout =" MOT(this) ; "
onmousedown=" MDN(this) ; " onmouseup =" MUP(this) ; "
>Colors</th>
<th colF=2
onmouseover=" MOV(this) ; " onmouseout =" MOT(this) ; "
onmousedown=" MDN(this) ; " onmouseup =" MUP(this) ; "
>Waters</th>
<th colF=3
onmouseover=" MOV(this) ; " onmouseout =" MOT(this) ; "
onmousedown=" MDN(this) ; " onmouseup =" MUP(this) ; "
>Names</th>
</thead>
<tbody ID="list1">
<tr>
<td>1 Life</td> <td class="bgred">Red</td> <td>Atlantic</td> <td>Britney</td>
</tr><tr>
<td>2 Liberty</td> <td class="bgorange">Orange</td> <td>Pacific</td> <td>Shania</td>
</tr><tr>
<td>3 Free Press</td> <td class="bgyellow">Yellow</td> <td>Artic</td> <td>Angelina</td>
</tr><tr>
<td>4 Religion</td> <td class="bggreen">Green</td> <td>Indian</td>
</tr><tr>
<td>5 Free Assembly</td> <td class="bgblue">Blue</td> <td>Taho</td> <td>Yolanda</td>
</tr>
</tbody>
</table>
<div ID="lay1"
style="position:absolute; left:0; top:0; display:none; font-weight:bold; text-align:center;
background-color: blue; font-family:Verdana; font-size: 14; size:14; color:white;
height:20; width:90; "
>
ColName
</div>
</body>
</html>
Frank (Canada)
January 26,