Board Logo

Sort on table load
Tolstoy - 7/29/2006 at 07:41 AM

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...


Tolstoy - 7/29/2006 at 07:46 AM

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:


<body onload="myTTP.exeSort(0, true);return false;">


Justin - 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

Back to forum: