Tolstoy
Member
Posts: 13
Registered: 5/25/2006
Member Is Offline
|
| posted on 7/29/2006 at 07:41 AM |
|
|
Sort on table load
Is it possible to automatically sort the table when the table is first loaded? What is the function call (presumably to use in body onload)?
Thanks for any help...
Justin
|
|
|
Tolstoy
Member
Posts: 13
Registered: 5/25/2006
Member Is Offline
|
| posted on 7/29/2006 at 07:46 AM |
|
|
Never mind... <but read on for an answer>
I actually went and RTFM's, and of course the answer was there all along, I just missed it the first time I read it.
For those of you who are interested, you can auto-sort your table in ascending order by using the following onload function in your body tag:
| Code: |
<body onload="myTTP.exeSort(0, true);return false;">
|
Lev
|
|
|
Justin
Junior Member
Posts: 6
Registered: 10/2/2006
Location: San Diego
Member Is Offline
|
| posted on 10/10/2006 at 04:02 PM |
|
|
In the template.js file, just add the following into the sorting section, no extra coding needed:
'cl' : 1, // Index of column to sort initially
'or' : true // Specifies sort order of initially sorted column. false = ascending, true = descending
|
|
|