This contains two simple tables with SortableTable objects attached to
them. For the second table the
thead has been hidden using CSS.
This demo generates a large table during load. A string is generated using
StringBuilder and then written to the page using
document.write. When generating such long strings as this the gain
of using a string builder is huge. The demo also uses the
method to be able to write out a status messsage while the sorting is being done.
In this demo the rows have alternating colors. Since the sorting reorders the
rows we'll have to change the colors after the actual sorting. This is done in
This demo table has a column containing inputs. In this case we define our own
getRowValue to find the value of the input.
This demo would have been much simpler if IE did not have a bug when it comes to DOM and input elements. In IE the value of the input is lost when doing DOM manipulations and therefore we store the input value before the sort and restore it afterwards.