External Sort Links - Change Sort Direction

External Sort Links - Change Sort Direction

dvdhtzrdvdhtzr Posts: 1Questions: 0Answers: 0
edited February 2011 in General
I've got a table with 4 hidden columns that i wish to be sortable via external links.
this piece of code adds a listener to one of the links to sort on column 2:

oTable.fnSortListener(document.getElementById('a_vFav'), 2)

The problem i'm having is that it only sorts ascending. What do i need to add to make these links function the same way as a header link, such that the sort direction changes with each click?

I tried using the fnSort() method on click of this link, but i get an error message saying "'aoColumns[...].sSortDataType' is null or not an object", and doesn't do the sort at all. At least the fnSortListener sorts once, so i'm going with that.

Any ideas?
thanks!
This discussion has been closed.