1. #1
    Sencha User
    Join Date
    Jul 2008
    Location
    Melbourne, Australia
    Posts
    71
    Vote Rating
    1
    ben_dog is on a distinguished road

      0  

    Question Case insensitive alphabetical sorting in gridpanel

    Case insensitive alphabetical sorting in gridpanel


    Hi,

    Running into a bit of an issue. Maybe someone knows how to fix it.

    In the gridpanel, the sorting of columns seems to based on ascii value (ie A < B < a < b).

    I would like the sorting to working without the case sensitiveness (like A < a < B < b).

    I could be done easily with a custom sort method I guess but I can't see any way to provide a custom sort method for a column.

    Can this be done?

    Thanks!

    Ben

  2. #2

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Location
    Melbourne, Australia
    Posts
    71
    Vote Rating
    1
    ben_dog is on a distinguished road

      1  

    Default


    ah, never noticed that sortTypes thing.

    Came across this thread http://extjs.com/forum/showthread.php?t=2532 which says string type should automatically be sorted case insensitive.

    Fixed it by specifying the 'type' for my store's fields property.

    So changed
    Code:
    store = new Ext.data.JsonStore({
         /* ... */
         fields : [ /* ... */ , 'title', /* ... */]
    })
    to
    Code:
    store = new Ext.data.JsonStore({
         /* ... */
         fields : [ /* ... */ , {name:'title', type: 'string'}, /* ... */]
    })
    And that seems to have fixed it.

    I would have thought string would have been the default type though somehow

    Anyway, it's fixed!

    Ben

  4. #4
    Sencha User
    Join Date
    Apr 2014
    Posts
    1
    Vote Rating
    0
    akaukuntla@hiremojo.com is on a distinguished road

      0  

    Default Thanks

    Thanks


    Code:
    fields: ['id', {name: 'name', type: 'string'}]
    Other posts wanted me to create custom sort functions which I didn't want to.
    Above line of code fixed my sort problem. I voted for you. Thanks!!!

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi