1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    1
    Vote Rating
    0
    kiptinui is on a distinguished road

      0  

    Default Unanswered: Sort icon and Grids

    Unanswered: Sort icon and Grids


    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:

    Code:
    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!

  2. #2
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    140
    Answers
    2
    Vote Rating
    1
    PhiLho is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1