Hybrid View

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    12
    Vote Rating
    0
    deepfriedbrain is on a distinguished road

      0  

    Default Unanswered: Sorting for Grouping Grid

    Unanswered: Sorting for Grouping Grid


    I'm looking at the Grouping Grid sample. By default the grid is sorted by group names. However, I have a use case where the sorting should be by the content of the rows, not by the group names.

    Is there any way to change the sorting behavior?

    Thanks.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Answers
    107
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    If the items are not sorted by group, how will the items in the same group be near each other? Do you really want each item in the first group to be broken into several groups?

    Assuming you want to sort *first* by the group property, then by the content of the rows, you can add a second sort info object to the loader (if sorting remotely) or to the ListStore (if sorting locally).

    Take a quick look at http://www.sencha.com/examples/#Exam...e:groupinggrid - it is grouped on the Industry property, but you can additionally sort on the Price or Name property by clicking that column header (which achieves what I just mentioned, adding it as a second sort info).

    Does that help answer the question? Or is there another kind of way to keep the items in the right groups, while sorting another way?

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    12
    Vote Rating
    0
    deepfriedbrain is on a distinguished road

      0  

    Default


    Let me explain the requirements with an example. That should make it clear.

    To give you some background, my application is written in SmartGWT and already in production. However, SmartGWT framework has serious issues (many widgets simply freeze) on the iPad that are reproducible in their showcase as well. But they have shown no willingness to fix it. Therefore, I'm evaluating EXT GXT with an intention to port the entire application over to GXT. The following example is something that I have working in SmartGWT by default. However, I cannot figure out a way to make it work in GXT.

    ItemID ItemName GroupName
    ============================
    1.1 ABCD CAR
    1.2 EFGH CAR
    1.3 IJKL AIRPLANE
    2.1 MNOP CAR
    2.2 QRST AIRPLANE
    3.2 UVWX BUS

    By default the grid will look like this:

    ItemID ItemName GroupName
    ============================
    AIRPLANE
    ---------------------------------------
    1.3 IJKL AIRPLANE
    2.2 QRST AIRPLANE

    BUS
    ---------------------------------------
    3.2 UVWX BUS

    CAR
    ---------------------------------------
    1.1 ABCD CAR
    1.2 EFGH CAR
    2.1 MNOP CAR


    In my application, the primary sorting should always start with Item ID. We don't want any sorting on the Group Names whatsoever. The result should look like the following. It is the default behavior with SmartGWT and exactly what I want. You can look at their Dynamic Group showcase sample.

    ItemID ItemName GroupName
    ============================
    CAR
    ---------------------------------------
    1.1 ABCD CAR
    1.2 EFGH CAR
    2.1 MNOP CAR

    AIRPLANE
    ---------------------------------------
    1.3 IJKL AIRPLANE
    2.2 QRST AIRPLANE

    BUS
    ---------------------------------------
    3.2 UVWX BUS


    Hope it's more clear now. Thanks.

Thread Participants: 1

Tags for this Thread

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