• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Controls > Creating a Sortable Table

Creating a Sortable Table

Data is not knowledge, but one way people can turn information into knowledge is by sorting it various ways for comparison. Tables are one of the primary methods of presenting different kinds of data, but once loaded in a Web page, tables are static. One common way to overcome this is to allow the visitor to re-sort table data by clicking a column header.

In this example, we’ll set up a three-column table using data stored in an array. When first loaded, the table will display the data as in the array (Figure 7.3). We will then provide controls that sort these arrays when any column’s header is clicked (Figure 7.4).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint