Hybrid View

  1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default Unanswered: Default column for sort in grid?

    Unanswered: Default column for sort in grid?


    I am wondering how do you make a column as the sorted column SortDir.ASC or SortDir.DESC by default when the grid first load?

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Answers
    20
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    Are you talking about making the little triangle thingy appear or to set the default sorting?

    If the latter, that is set when your grid makes the call to your, say, RpcProxy. In our server side code, we get a FilterPagingLoadConfig object, convert that to a SearchCriteria and pass that along to our business logic and DB routines. This method returns a ListLoadResult object which contains, amongst other things, the SortInfo (which contains the sort direction).

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    the little triangle thing, i know how to get the sort info however when the grid first load, i want it to be able to have it sorted in a certain way by default.

    i tried to mess with the store but that caused arrow to appear but wacked the server side sorting.

  4. #4
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Answers
    20
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    I don't know of a way to automagically make that arrow appear, but it sounds like you found one. The only thing you'll need to do is account for the initial request to the server from the grid for data.

    In our case, the initial request from the grid has empty SortInfo so we use that as a smoke screen to discern between the initial and subsequent requests. In our case, however, we do not care about the missing triangle. I would think that good UI design dictates that the first column is sorted by default but clearly, every use case is different.

  5. #5
    Sencha User
    Join Date
    Oct 2008
    Posts
    11
    Vote Rating
    0
    kaefert is on a distinguished road

      0  

    Default


    I too would be interested to know how to programatically set the sort column to the grid, in a way that also makes the little triangle show up.

    Manipulating my loadProxy or my server side code to manipulate the sorting is not a problem, but that doesn't give me the little triangles

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    1
    Vote Rating
    0
    Sergeyy is on a distinguished road

      0  

    Default


    Try to use:
    store.setDefaultSort("column_id", SortDir.ASC);

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar