I am displaying a simple table in the web page. The values for this table are directly coming from database. Now I need to provide 'sort' option based on the table column header.
Just an example 'Head1', 'Head2', 'Head3' are the table headers (1st row). On click of 'Head1' the table rows should be sorted based on 'Head1' value in ascending order. On second click of 'Head1' it should sort in descending order. Aslo please let me know how to provide 'up arrow' and 'down arrow' mark in the column head which indicates 'the table is sorted based on which column and the order is ascending or descending.'