Results 1 to 3 of 3

Thread: Grid Sorting Isuue

  1. #1
    Sencha User
    Join Date
    Oct 2013
    Posts
    200
    Answers
    3
    Vote Rating
    3
      0  

    Default Grid Sorting Isuue

    Hi,

    Can anyone please tell me what kind of sorting algorithm is used for Grid Sorting?

    I have a situation where i am using a single store that has multiple records, and records are arranged in such a manner that some records are parent and some are child of one of the parent record.
    Now when i want to perform sorting on grid - I want parent elements and child elements to be arranged properly, I tried by overriding doSort function but not able to write the correct logic that works in all scenario(for Assending and desending order sort).
    For example i have one column data as

    0
    2500
    1200 (child element)
    0 (child element)
    0 (child element)
    1800

    And i want to sort it in assending order that looks like -

    0
    1800
    2500
    0 (Child Elements)
    0
    1200

    As the sorting algo works in extjs grid, i am not able to compare 1800 with 2500 in doSort function.

    can anyone please suggest what can i do for that? Any Help would be appreciated.

    Thanks,
    Ankit

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506
    Vote Rating
    296
      0  

  3. #3
    Sencha User
    Join Date
    Oct 2013
    Posts
    200
    Answers
    3
    Vote Rating
    3
      0  

    Default

    Hi,

    Thanks For Replying !!

    No, I am not using Association. because i am getting data from some other service and its in a single model. I am getting data in a single store that i need to sort the store based on the parent child levels.

    can we make any composite key to sort that can make each record unique by maintaining the Parent -Child relationship as well.

    Thanks,
    Ankit

Posting Permissions

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