Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJSIV-9184 in 4.2.1.
  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    204
    Vote Rating
    0
    nicolabaldo is on a distinguished road

      0  

    Default grouping grid with the first char

    grouping grid with the first char


    I use ExtJs 4.1.3 and Architect.
    I've got a grid with the fields: name and surname.
    I need to group the surname by the first char, for example:

    A:
    ANDERSON GINA
    ANDERSON PAOLA

    B:
    BAT MAN
    BAT MOBILE

    ...

    I set the groupField= surname[0] but It doesn't work...
    Any solution?
    Thanks.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    You can override the "getGroupString" method on your grouper to return the first character of that field.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    204
    Vote Rating
    0
    nicolabaldo is on a distinguished road

      0  

    Default


    It works with ExtJ s4.1.3 but withExtJs 4.2 no!

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Interesting; sounds like a Ext JS 4.2 bug. Could you provide a simple example for me to pass along to the Ext JS team?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    204
    Vote Rating
    0
    nicolabaldo is on a distinguished road

      0  

    Default see the test||

    see the test||


    this is my attachment.
    Thanks.
    Attached Files

  6. #6
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    204
    Vote Rating
    0
    nicolabaldo is on a distinguished road

      0  

    Default any solution?

    any solution?


    Quote Originally Posted by aconran View Post
    Interesting; sounds like a Ext JS 4.2 bug. Could you provide a simple example for me to pass along to the Ext JS team?
    Any solution?

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,458
    Vote Rating
    20
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    The store needs to be configured with

    Code:
    groupers: {
                        property: "nome",
                        getGroupString: function(record) {
                            debugger;
                            return record.get('nome')[0];
                        }
                    },

  8. #8
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    204
    Vote Rating
    0
    nicolabaldo is on a distinguished road

      0  

    Default


    Did you read my next post about the override?

  9. #9
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    The override needs to run before the beforerender.

    Link it as a static file resource, click + at the top of the inspector -> Resource -> JS Resource. This is where the override belongs.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,458
    Vote Rating
    20
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.