Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    New row pops out of view in sorted ListGrid although sorting is automatically removed

    Hi Isomorphic,

    when editing rows that should be out of view according to the current sorting you remove the sort in order not to have the just edited row out of view (like you recently answered e.g. here).

    This does not happen for new added rows, where the behavior should be the same. See this testcase using the online showcase (now using v11.0p_2016-11-04, happens also in my testcase using v10.1p_2016-11-03).
    1. Open sample
    2. Sort by country name (Brazil on top)
    3. Click "Edit new"
    4. Note that the ListGrid scrolls to the end
    5. Enter "AA" as county name
    6. Note that the sort is removed (as expected) but that the record is on the very top (as if the ListGrid is still sorted) (bug#1)
    7. Click "Edit new" again
    8. Enter "AA2" as county name
    9. Note that the record is again put in order as if the ListGrid was still having a sort (which was removed in #6, at least the sort indicator is not shown).
    To me it seems as if there is a problem with removing the sort for newly added records that does not exist for updated records.

    Even if you update existing records (no resort) and then add another record, the previously updated record is resorted.

    This is a minor one for me.

    Best regards
    Blama

    #2
    Click image for larger version

Name:	Resort after add.gif
Views:	99
Size:	123.5 KB
ID:	241210

    Comment


      #3
      Read the docs for updatePartialCache - we choose between possible locations to place a new record, and what you're seeing is just those choices being applied, not sorting occurring.

      Comment


        #4
        Hi Isomorphic,

        thanks for the hint on the docs (this one, correct?), I did not know that.
        I do still think there is some kind of sorting happening, as also the updated entries are moved, see this gif (this is the sentence "Even if you update existing records (no resort) and then add another record, the previously updated record is resorted." in the last post):
        Click image for larger version

Name:	Resort after update and add.gif
Views:	106
Size:	263.3 KB
ID:	241221

        I do not see anything related to sorting in the Developer Console for ResultSet set to debug, though.

        Best regards
        Blama

        Comment


          #5
          Yes, it's moved - to the position that the updatePartialCache docs say that we will move it. But that is not a sort.

          Comment


            #6
            Hi Isomorphic,

            perhaps I have the wrong link then? The ones I linked in #4 say
            updated rows will remain in their current position. No attempt will be made to sort them into a new position even if the sort field was updated.
            Best regards
            Blama

            Comment


              #7
              Seriously just read the very next sentence:

              • updated rows will remain in their current position. No attempt will be made to sort them into a new position even if the sort field was updated.
              • newly added rows will be added at either the end (first preference) or beginning of the dataset if that part of the dataset is cached and was most recently requested. If not, the new row is added at the end of the most recently requested contiguously cached range

              Comment


                #8
                Hi Isomorphic,

                I saw that one of course. Isn't this about the difference you are handling rows from update or add operations?
                I showed a case where a updated row is (later) moved as well.

                But if you say this is correct behavior this is completely fine for me. I just noticed it testing something else and though it was wrong.
                (No issue in my own application, no complaint from one of my users.)

                Best regards
                Blama

                Comment

                Working...
                X