WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Sortable Table 1.12, Stian Totland, August 28, 2004
     Re:Sortable Table 1.12, Erik Arvidsson, August 29, 2004
         Re:Sortable Table 1.12, Erik Arvidsson, August 31, 2004
         Re:Sortable Table 1.12, Stian Totland, August 29, 2004

Subject: Re:Sortable Table 1.12 From: Stian Totland Date: August 29, 2004

Erik, that works great. Thanks!

One minor issue though: I now have the second table in div with overflow=auto, so that I can scroll without loosing the headers. The only problem now is that the tHead colums and the tBody colums don't have the same width. You got a quick hack to fix this?

Stian

From: Erik Arvidsson
Sent: August 29, 2004
Subject: Re:Sortable Table 1.12

"Does this mean that one can have tHead and tBody in two different tables? Can you please provide an example?"

That is correct.

In demo.html:

1. remove the thead in the second table
2. Copy paste the tbody (so that there are 2 tbodies)
3. Change the second sortable table to:

var st2 = new SortableTable;
st2.setTHead(document.getElementById("table-1"));
st2.setTBody(document.getElementById("table-2").tBodies[1]);
st2.setSortTypes(["String", "CaseInsensitiveString", "Number", "Date", "None"]);

4. Now when you click on the headers in the first table the second table body in the second table is sorted.

erik





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX