Hallo,
at first a simple test case:
Indepent of the property in setSortDirection, the grid is always sorted ascending. Is this a bug or did I make a mistake some where?
Christian
PS: I'm using smartgwt 2.2.
at first a simple test case:
Code:
public class TestGrid extends Canvas { protected void onInit() { super.onInit(); ListGrid grid = new ListGrid(); ListGridField idField = new ListGridField("id"); grid.setFields(idField); grid.setData(getTestData()); grid.setWidth100(); grid.setHeight100(); grid.setSortField(0); grid.setSortDirection(SortDirection.DESCENDING); this.addChild(grid); this.setHeight100(); } private Record[] getTestData() { return new Record[] { getRecord(3), getRecord(2), getRecord(4), getRecord(1), getRecord(5) }; } private Record getRecord(int value) { ListGridRecord record = new ListGridRecord(); record.setAttribute("id", value); return record; } }
Christian
PS: I'm using smartgwt 2.2.
Comment