Results 1 to 3 of 3

Thread: Drag n Drop of Multi Select Enabled Grid rows can result in wrong ordering

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
      0  

    Default Drag n Drop of Multi Select Enabled Grid rows can result in wrong ordering

    Best way to describe this is with the supplied Grid to Grid DnD example:
    1. Click on Row 1 to select
    2. Ctrl-Click on Row 0 to add the selection
    3. Drag to the other grid
    4. Row 1 is above Row 0!
    If you select Row 0 & then ctrl-select Row 1 it works as expected. Seen in ExtJS 4.1.1 & 4.2.0. BTW, this is also true with DnD of multi-selects within one grid though you can't do that with the example code.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    This is because of the selection model keeps your selection in order that you select them so if you do

    Code:
    grid.getSelectionModel().getSelection()
    after step 2 you will see the order there has row 1 first. The 2nd grid's store you can have a sorter to get around this.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
      0  

    Default I would still consider this unintuitive or at least undocumented.

    That's what I thought was going on, but I can live with it.

    Thanks!

Posting Permissions

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