Results 1 to 3 of 3

Thread: Unable to sort data in grid according to browser locale

  1. #1
    Sencha User
    Join Date
    Feb 2015
    Posts
    5

    Default Answered: Unable to sort data in grid according to browser locale

    Hi all,

    I need data to be sorted according to browser locale when the user clicks on the column header in a grid. For English, sorting works fine but for other languages it doesn't. I know the sorter function too but I don't know where to apply it. In ExtJS 4.x there was a doSort() function for the column where I could put in my sorter function but that does not exist in ExtJS 5.x.

    The sorter function would be:

    function(a, b) {
    return a.localeCompare(b);
    }

    Please help me on where do I actually place this function as doSort() function does not exist anymore.

    Thanks a lot

  2. Take a look at the example here on where to apply to Sorters: http://docs.sencha.com/extjs/5.1/5.1...xt.util.Sorter

  3. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Take a look at the example here on where to apply to Sorters: http://docs.sencha.com/extjs/5.1/5.1...xt.util.Sorter
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  4. #3
    Sencha User
    Join Date
    Feb 2015
    Posts
    5

    Default

    I have already tried what you have specified here. Sorters are only for initial sorting of items in the store when it is loaded. The sorterFn in the Sorters is not called when you click the column header of a grid after the data is loaded. So I don't think Sorters are of much help here.

Similar Threads

  1. ExtJs 6 unable to access singleton in locale package
    By s.noel in forum Ext JS 6.x Q&A
    Replies: 8
    Last Post: 12 Jul 2015, 9:54 AM
  2. Replies: 3
    Last Post: 3 Mar 2014, 4:06 AM
  3. Unable to populate default date in Datepicker control for Chinese locale
    By Prachik in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 14 Dec 2011, 9:19 PM
  4. Unable to access data in grid using data store or grid when using HttpProxy
    By Tamara Williams in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 14 Jun 2007, 2:02 PM

Posting Permissions

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