Announcement

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

    Problem with grid inline editing removing sort

    SmartGWT Version: v11.0p_2016-10-14/LGPL Development Only

    Sample code attached.

    I have a grid sorted on a specific column. It also has inline cell editing enabled. If you edit one of the cells and press the enter key, the sort on the grid is removed. This seems like a defect.
    Attached Files

    #2
    P.S. We were previously using a 5.0p version from 2015.12.10 and this did not happen. We recently rolled to 6.0 and this started happening.

    Comment


      #3
      This is actually longstanding, intended behavior. Because we don't want the row the user has just edited to suddenly pop out of view, the grid unsorts. If you want to force sorting to be re-applied (which we don't recommend) call resort().

      Comment


        #4
        Well, in our case they can't edit the field it is sorted on, so changing position is not an issue. In fact, it is the fact that the sort gets turned off that is causing the record to move. I assume that we should call resort() in some event handler. Which event handler to you recommend calling resort in? Do we need to re-establish the sort configuration before calling resort, or does it automatically restore the sort that was removed?

        Comment


          #5
          "Longstanding" is an interesting comment since this worked the other way only one version back.

          Comment


            #6
            Ah, you're saying that you see unsorting even when the sort field is not edited. That's not intended (and obviously not longstanding), we'll check into that.

            Comment


              #7
              Yes, if the user edits a field that is not the one sorted upon, the sort is being removed and the records in the grid are rearranging.

              Comment


                #8
                This has been fixed for builds dated October 21 and later.

                Comment


                  #9
                  Looks like this took care of things. Thanks for the patch.

                  Comment


                    #10
                    Could this issue be back? I'm not using inline editing, but external editing via the same data source and the grid gets reloaded.

                    Comment

                    Working...
                    X