Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I would like to sort on a column with a round trip but no page reload. The table is very large and has to be paged in, which I am doing manually with an ajax select element. I know TableSort is available to extend the query but I've only seen examples that reload the page.

share|improve this question
    
First, why would you need AJAX if you already have the table data? And secondly, how does this pertain to Drupal specifically? Seems like you might have better luck on one of the other SE sites. –  David Watson Mar 14 '12 at 16:18
    
I updated the question with a bit more info. –  Joe Beuckman Mar 14 '12 at 16:25
add comment

2 Answers 2

up vote 0 down vote accepted

Why not to use Views module to display your data? Views already has AJAX paging, sorting and filtering.

share|improve this answer
    
I would have to integrate my entity with views to do that. Does views create a TableSort-extended output? I don't use Views that much in custom modules. –  Joe Beuckman Jul 23 '12 at 21:12
    
What do you mean "TableSort-extended"? Views provides table sorting and it can be done by AJAX out off the box. –  Eugene Fidelin Jul 24 '12 at 8:37
    
Tablesort is a Drupal query extender - not just "sorted table" in general. api.drupal.org/api/drupal/includes!tablesort.inc/class/… –  Joe Beuckman Jul 24 '12 at 14:10
    
For what purpose do you need "Tablesort"? If you want allow users to sort table rows by clicking on their headers - then views can do it for you. If you use Views module - you do not need use Drupal query manually. –  Eugene Fidelin Jul 24 '12 at 14:34
1  
Update: I decided to use views :) –  Joe Beuckman Aug 20 '12 at 14:41
show 1 more comment

here you go mate:

ajax table sorting

share|improve this answer
add comment

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.