Results 1 to 5 of 5

Thread: Store is not sorted by GroupString after changing getGroupString

  1. #1
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    16
      0  

    Default Unanswered: Store is not sorted by GroupString after changing getGroupString

    Hello everyone,

    I updated the function getGroupString on my store in order to ignore the "A" or "An" at the beginning of the field while grouping. For example, when the field is "an orange", I want it to go to the "o" group.

    Strange thing is : my list is not sorted by groupString. For example, with the field "an orange", the group is actually "O" as expected, but the group itself is sorted before "B" because the started "A" is used...

    Any idea ?

    Thank you all !

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    Yes, you will need to sort the store manually if you want to change the group.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    16
      0  

    Default

    By "manually" you mean use the sort function, or actually do the sorting by hand ?

    Thanks

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    store.sort()
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    16
      0  

    Default

    Ok. And according to you, what is the best moment to sort the store ? Because I tried in the load callback function and it does not work...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •