aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes dynamic table with sort Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "dynamic table with sort" Watch "dynamic table with sort" New topic
Author

dynamic table with sort

Anirudh Jhina
Greenhorn

Joined: Jul 26, 2005
Posts: 5
hi,
i need a table with expand/collpase rows. it should also support sorting. sorting should first apply to the parent nodes and then its respective children should be sorted. Thanks in advance.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
We have a rule about display names: your display name must consist of a real-sounding first and last name. Nicknames and single names aren't acceptable. You can change your display name here. Thanks for cooperating!

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
How the table look at this:
http://www.activewidgets.com/javascript.forum.3982.0/how-to-sort-a-table.html

Eric
Anirudh Jhina
Greenhorn

Joined: Jul 26, 2005
Posts: 5
Thanks for the info. Was not aware about the naming rules.
Anirudh Jhina
Greenhorn

Joined: Jul 26, 2005
Posts: 5
I do not have the requirement that you pointed at.
In my case i have a row in a table which has child rows in the same table. If a row has a child row then in the first column a + sign will be displayed for expanding it. On clicking on the + sign the child rows are shown.

Assuming we give levels to the rows depending on the level they are at from the root parent.
i.e Row no. 1 will be at level 1
if this row has a child that will be at level 2 and will be row 2 but hidden unless the + button on the parent is clicked.
now if this row2 also has a child that will be at level 3

Now when doing sorting on a column, first all the rows at level 1 should be sorted, then for each level 1 row, it respective level 2 rows will be sorted, for each level 2 its level 3 rows will be sorted and so on....

Thanks in advance
Anirudh
David Durman
Greenhorn

Joined: Sep 12, 2012
Posts: 1
You might try DynamicTable, a tiny JavaScript library for sorting, filtering and paging
HTML tables. Here is a demo and blog post. MIT licensed.
Eric Bresie
Greenhorn

Joined: Apr 05, 2011
Posts: 20
You might want to look at some additional javascript frameworks that provide some datatable functionality.

jQuery UI has some plugins like jqGrid (see Grouping examples) or Datatable that may meet your needs.

Or YUI equivalents.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I see someone pulled up a 7 year old thread to pimp there site.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic table with sort