How to sort an html table
Posted Date Unknown BINTA PRASAD 6 Comments


  I have an html table(static) without any header tags.I need to sort the table in alphabetic order based on a particular  
  column.Please help me..

Thanks in advance

See All Responses Below...
Message Rating
Posted on: 06/09/2012
If the table is static HTML , then you need to sort it in the DB query itself and fill the contents in the dataset in the table one by one with appropriate HTML tags.

Alternatively there is an ASP.NET table control shipping with Visual studio .. Probably it might have the sort option.. Please try that control..


Posted on: 06/09/2012
You can make an html table sortable with the help of Javascript. Try the instructions from,
Share this page across other social networking sites

Posted on: 06/09/2012
 you just try with the link given below using script

Posted on: 07/09/2012
This should work I believe..see whether it suites your purpose..

Share this page across other social networking sites

Posted on: 07/09/2012
Thanks 4 all the replies.Let me be more specific about my question,in my table i dont have header tags.I want my table to get sorted without clicking on any header tags.In all the links above while clicking on the column header the table gets sorted...
Posted on: 07/09/2012
its simple.......

try with some change
1. add a dummy row at top.
2. open  sortTable.js and change

sortTable("column no which you want to sort",, 0);

var updownColor = 'white'; // or remove it
Share this page across other social networking sites

Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

Academic Projects