The setSortOrder and the setSortComparator functions on a gridbox column
have no effect on the displayed sorted order for data in the drop down. In
addition, the data in a dropdown is listed in the reverse order to which it
was added.
The code that was used to demonstrate this behavior is:
<Setup GridBox>
...
GridBox.Column col1 = new GridBox.Column();
col1.setName("Name");
gb.getColumns().add(col1);
col1.setSortOrder(GridBox.Column.SortOrder.ASC);
col1.setSortComparator(new Comparator()
{
public int compare(Object o1, Object o2)
{
System.out.println(o1.toString());
System.out.println(o2.toString());
return o2.toString().compareTo(o1.toString());
}
});
<Add data to grid...>
I have tried changing various values (SortOrder.NONE, SortOrder.DESC), and
turning on and off the allowSort value for the grid but it has no effect on
the rendered drop down.
Joshua Gertzen
Server Generated Error/Exception
v1.2 RC2
Public
|
Date: 2008-01-02 20:54
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-01-02 20:54 | pra9ma |
| resolution_id | None | 2008-01-02 20:54 | pra9ma |
| category_id | None | 2008-01-02 20:54 | pra9ma |
| assigned_to | nobody | 2008-01-02 20:54 | pra9ma |
| close_date | - | 2008-01-02 20:54 | pra9ma |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use