It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes Multi Level Sorting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Multi Level Sorting" Watch "Multi Level Sorting" New topic
Author

Multi Level Sorting

Soumya Saha
Ranch Hand

Joined: Apr 14, 2006
Posts: 64
Hi,
Anybody has any idea about how to do multi level sorting on a table.Any help will be highly apreciated

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
JavaScritp can not handle large tables to be sorted, You can only do it on a small level before the browser freezes.

Eric
Soumya Saha
Ranch Hand

Joined: Apr 14, 2006
Posts: 64
Hi Eric,
Thanks for the reply.Any Idea on how I can resolve this issue where I have 50 rows and I have to sort it in multiple levels.I can do a single level sorting.Any replies will be highly appreciated

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Databases are really good at sorting.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Soumya Saha
Ranch Hand

Joined: Apr 14, 2006
Posts: 64
Hi Bear,
Thanks For the reply.I am already doing it from database only.But the prob is that I have next/prev buttons and the back/forth logic is based on the primary key.So the sort order selection is mixing it all.that's why I want to go for html.

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

I still don't see why you don't let the db do the sorting. I do it all the time.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Yes, database sorting is a good way to go. I did this at my last job and created similar code at my new job. The paging is all done on the client side, but the column sort is done on the server side via an Ajax call. Works like a champ.

But the prob is that I have next/prev buttons and the back/forth logic is based on the primary key.So the sort order selection is mixing it all.

You just need to keep track of that data better is all.


GenRocket - Experts at Building Test Data
 
Don't get me started about those stupid light bulbs.
 
subject: Multi Level Sorting
 
Similar Threads
super class, class
Using Display Tag for multiple column sorting (secondary sorting)
Which sorting is better, Code Level Vs Database level?
Java Tutorial Table Sorter
Sorting a multi-dimensional array