I have simple view that display all nodes of type "fileshare" (see module of the same name), the view type is "table view". Columns are Title, a custom CCK text field, Author, Comment:count, Workflow state and Updated Time.

Default sort criteria is the update time.

I've set one, some or all other columns as "sortable". The columns headers are clickable, the page reloads and shows the sort arrow when i click on them, but the order of the nodes does not change: it remains the the default one.

Comments

Status:Active» Postponed (maintainer needs more info)

Do you have anything in the 'sort criteria' section? Those sorts will all come *before* click sorts.

I'm having the same issue and yes, I have a sort criteria.

My question is would it be possible to have an option on which criteria to sort on when a user clicks on the heading?

For example, I have a catalogue of items with a "Purchase" and "Updated" dates. The sort criteria is to sort on the "Purchase" date but the "Purchase" date is NOT shown on the table because I want the "Updated" date to show instead.

Now, when a user clicks on the title column of the item or clicks on the "Updated" column, I want the sort order to change.

Basically, I want to be able to sort the items based on the header clicked but I want a DEFAULT sort based on a field NOT SHOWN on the table.

I'm having the same issue and yes, I have a sort criteria.

My question is would it be possible to have an option on which criteria to sort on when a user clicks on the heading?

For example, I have a catalogue of items with a "Purchase" and "Updated" dates. The sort criteria is to sort on the "Purchase" date but the "Purchase" date is NOT shown on the table because I want the "Updated" date to show instead.

Now, when a user clicks on the title column of the item or clicks on the "Updated" column, I want the sort order to change.

Basically, I want to be able to sort the items based on the header clicked but I want a DEFAULT sort based on a field NOT SHOWN on the table.

Status:Postponed (maintainer needs more info)» Closed (works as designed)

As I said previously: Those sorts will all come *before* click sorts.

Title:Table view: sortable column headers don't sort nodesThere is the solution

Filally I found the solution for this issue, you have to create different view pages, and link between them, make it looks like sorting in the page, but actually they are all differnet pages.

For example, say if I use "product number" at sort critiria, and I want user to be able to sort it by "porduct name" then:

1. Create a view page, use "product number" for sort critiria.
2. At "product name" colum type (a href="SortByPname")product name(/a)
3. Then now you have a link to another page called "SortByPname".
4. Create another view page use "product name" for sort criteria.
5. Remember to create another link to go back to the original page.

p.s. change () to <>

Title:There is the solutionTable view: sortable column headers don't sort nodes

Setting title back

As I said previously: Those sorts will all come *before* click sorts.

What is the reason for this to be the actual behavior ? It seems unintuitive to me. I would rather imagine to be able to sort the items based on the header clicked, overriding the default sort criteria, or even be given the choice to configure whether the sort criteria is overridden or not.

Tunghua's solution is a good workaround, but it is not really satisfactory.

Hi,
If there is ever a patch to make the click sort override the general view's sort, i'd be glad to have it. It does indeed seem quite counter-intuitive.
Thanks for the explaination