Sorting a table in runtime with click on title
Posted: Sun Jun 25, 2006 8:08 am
I have been trying to find a solution for my problem. I have a customer database and i display the data from the database in a table. The first row of the table carries the title of respective columns.
My requirement is, when i click one of the title, the contents of the entire table ie all the rows should be sorted based upon this field. For initial consideration, say the sorting is done in ascending order based upon the field title being clicked. How can i do this ?
I know that client side actions can be done using Javascripts, but am not that much exp in java to write a script for this. This kind of interactive table sorting is present in certain mail clients like yahoo, where you can sort your mails shown in your inbox by clicking over any of the field titles.
It would be very usefull if am guided upon this, atleast with links where i can get to know how to do this ? [:)]
My requirement is, when i click one of the title, the contents of the entire table ie all the rows should be sorted based upon this field. For initial consideration, say the sorting is done in ascending order based upon the field title being clicked. How can i do this ?
I know that client side actions can be done using Javascripts, but am not that much exp in java to write a script for this. This kind of interactive table sorting is present in certain mail clients like yahoo, where you can sort your mails shown in your inbox by clicking over any of the field titles.
It would be very usefull if am guided upon this, atleast with links where i can get to know how to do this ? [:)]