Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I have a table of books with this data: name, description, cost, year. I show 15 rows and pagination using AJAX. Each header of each column is clickable and let the user sort the data. The problem comes here: I don't know if I may sort with javascript the 15 rows that are shown or sort the n results of the query on server.

What I have thought is that if I sort just the 15 rows, the user probably will lose some data. But, if I sort the n results, the pagination should start from 1 again, always. Because if I show the same page, the user probably will see other data.

I really don't know, maybe I'm wrong and that's why I'm asking you, what's the best usability way. Thank you very much!

share|improve this question
1  
Welcome to UX! Please improve your question by making it more specific - asking what the most usable solution is is very broad and will be hard to answer well. –  Rahul Aug 21 '11 at 22:00

3 Answers 3

up vote 3 down vote accepted

Clicking on a column name must always sort the entire data set imho. There is nothing wrong if the user sees different data on the first page when he knows that he has applied a different sorting criteria.

Sorting only the first page is useful only if you want to execute 2 sorts sequentially. eg: sort the books by cost and further order the top 15 results by their year of release.

share|improve this answer

The expected behavior is that clicking on a column header sorts the whole dataset, not just the visible part. With straightforward pagination, the results are still perceived as one large dataset, and not as separate subsets.

If you really want users to sort the visible results, you might want to add in a selection / refine results / filter step to explicitly select a smaller set of results to work with. Note that checkboxes in the header for select/deselect all typically work on only the checkboxes below, not on the results that aren't visible.

As for pagination, restarting at page 1 makes sense: for an A-Z sort, items starting with A will show first, which is immediate feedback that the sort went well. In case an application works with one active item, keeping that item in focus and sorting all the other items around it can work too: in that case the results will show the page with the active selection (not necessarily page 1).

share|improve this answer

If I understand your question correctly - if a user clicks on the table heading to sort and the data has multiple pages, they'd expect the entire data to be sorted rather than just the page they were looking at.

eg. if I wanted to see something with a title starting with Z I'd want to click on the title heading twice (first click should be alphabetically ascending, second click descending) and instantly see my Z items, rather than having to click on the last page and then sort.

Though the question is a little confusing so maybe I have missed your point :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.