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..
Tom
hai...
you just try with the link given below using script
http://www.codeproject.com/Articles/1604/Sorting-HTML-Tables-using-Javascript
This should work I believe..see whether it suites your purpose..
Tom
Share this page across other social networking sites
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...
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", table.id, 0);
and
var updownColor = 'white'; // or remove it
Share this page across other social networking sites