Sorting Table Content


It's not uncommon to enter data into a table, then add more data, and then want to sort the whole thing. You asked for it, Dreamweaver can do it. The program sorts by the content of any column in your table, either numerically or alphabetically , in ascending or descending order, and can sort on two successive criteria.

There are some limitations to Dreamweaver's sorting abilities . You cannot sort merged cells, and Dreamweaver doesn't have the ability to sort part of a table, so you can't, for example, have the program ignore the merged cells you used for your table's title. Dreamweaver displays an error message if you try to sort a table containing merged cells .

Another problem is that the sorting algorithm Dreamweaver uses isn't terribly smart. For example, you can sort numerically, but Dreamweaver doesn't understand dates in tables, so you're liable to get sorts like this:

3/19/99

3/25/77

3/3/02

Dreamweaver sorted the dates numerically, reading left to right, which resulted in an incorrect sort.

Despite these restrictions, table sorting in Dreamweaver is usefulyou just have to be aware of the limitations.

To sort a table:

1.
Place the insertion point in any cell of the table you want to sort.

2.
Choose Commands > Sort Table.

The Sort Table dialog appears ( Figure 9.31 ).

Figure 9.31. The Sort Table dialog lets you sort the contents of your table either alphabetically or numerically.


3.
From the "Sort by" pop-up menu choose the column you want to use to sort the table.

4.
In the Order pop-up menu on the left, choose whether to sort the column alphabetically or numerically.

5.
In the Order pop-up menu on the right, choose whether to sort the column in ascending or descending order.

6.
If you want to sort on a second set of criteria repeat steps 3 through 5 with the "Then by" set of pop-up menus .

7.
Make any selections from the Options list.

By default, the "Sort includes the first row" option is not selected. This is because the first row of a table is frequently a header row. If your table doesn't seem to be sorting properly, check this option.

8.
Click OK.

Dreamweaver sorts your table according to the criteria you selected.

Tips

  • Dreamweaver can't sort on rows, just columns .

  • If you want a merged row at the top of your table, do the sort first, and then merge the cells.

  • Be careful when you're sorting numbers . If you accidentally leave the sort on Alphabetically, you'll get an alphanumeric sort (1, 10, 2, 20, 3, 30) instead of a numeric sort (1, 2, 3, 10, 20, 30).





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net