PDA

View Full Version : default sort in a table


jayj
04-21-2008, 01:47 PM
Is there a way to specify the column (and direction) that the data is sorted by when the table is initially rendered? I see a getSortDir() method in TableColumn but there is no setSortDir().

darrellmeyer
04-21-2008, 11:02 PM
There is not a way to do this with the current code. I have made some changes that will allow you to specify the initial column sort state. You can call sort() on table before it is rendered. Code will go out in next rev.

Table tbl = new Table(cm);
tbl.sort(1, SortDir.DESC);