PDA

View Full Version : default sort in a table



jayj
21 Apr 2008, 9:47 AM
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
21 Apr 2008, 7: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);