PDA

View Full Version : Sort icon and Grids



kiptinui
15 Dec 2011, 10:50 AM
Hi,

I currently have a functioning Grid. When I sort a column by clicking the header the data is sorted as you would expect. The sort icon (up/down arrow) appears in the header to indicate the sort.

However, when I load the sorting information into the grid programmatically, with:



PagingLoadConfig config = new BasePagingLoadConfig();
config.setSortField("foo");
config.setSortDir(SortDir.DESC);

...etc...


the sort icon does not appear in the header. You must click the header for it to appear.

Is there a way I can force the sort icon to appear when the data is initially loaded into the grid?

Thanks!

PhiLho
23 Dec 2011, 3:27 AM
I found in com.sencha.gxt.widget.core.client.grid.ColumnHeader the updateSortIcon(int colIndex, com.sencha.gxt.data.shared.SortDir dir) method. Perhaps it is the one you are looking for.