1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    Manchester, UK
    Posts
    112
    Answers
    4
    Vote Rating
    8
    LisburnLad will become famous soon enough

      0  

    Default Answered: Tree view drag-drop with multiple drop groups

    Answered: Tree view drag-drop with multiple drop groups


    I have a tree of categories with drag-drop enabled, to let me re-order the nodes of the tree. Additionally I have a grid, from which I can drop items onto the tree to add them to these categories. What I'd like would be for tree node drag-drop operations to allow any type of drop operation, but the drops from the grid to only use the 'appendOnly' drop option, so that items can only be added to categories, rather than being inserted before or after nodes.

    I tried having multiple 'treeviewdragdrop' plugins but this resulted in a duplicate ID error.

    Is it possible to have a tree view that has more than one drop group, with different drop operations specified for each group, or that uses multiple 'treeviewdragdrop' plugins?

  2. I created a feature request (story) for this a while ago: EXTJSIV-6574.

    "As far as I know ddGroup is limited to a single string -> exactly one group.
    It would be really cool, if you could specify multiple groups inside that string, just separated with a blank char.
    Like ddGroup: 'mygroup1 mygroup2'
    In complex apps with many drag and drop groups this would bring the interaction possibilites to a new level."

    Right now this is not possible out of the box.

    If you try to implement it on your own, do not use multiple treeviewdragdrop plugins, since it only will cause errors (on drag creating 2 drag proxies of the same element). The way to go is to read the source of the DD implementation and parse ddGroup for blanks and make them own groups to match. You could also change ddGroup to support arrays, probably cleaner.

    Best regards
    Tobias

  3. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,684
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    I created a feature request (story) for this a while ago: EXTJSIV-6574.

    "As far as I know ddGroup is limited to a single string -> exactly one group.
    It would be really cool, if you could specify multiple groups inside that string, just separated with a blank char.
    Like ddGroup: 'mygroup1 mygroup2'
    In complex apps with many drag and drop groups this would bring the interaction possibilites to a new level."

    Right now this is not possible out of the box.

    If you try to implement it on your own, do not use multiple treeviewdragdrop plugins, since it only will cause errors (on drag creating 2 drag proxies of the same element). The way to go is to read the source of the DD implementation and parse ddGroup for blanks and make them own groups to match. You could also change ddGroup to support arrays, probably cleaner.

    Best regards
    Tobias
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  4. #3
    Sencha User
    Join Date
    Dec 2008
    Location
    Manchester, UK
    Posts
    112
    Answers
    4
    Vote Rating
    8
    LisburnLad will become famous soon enough

      0  

    Default


    Hi Tobias,

    Thanks for the answer. Knowing that this can't be done out of the box will save me a load of time messing around.

    As you say, it would be good if multiple groups could be specified, and in my case, even better if each group could be given distinct properties.

    I'll bear your suggestions in mind if I try to implement this myself.

    Thanks again,
    Steve

Thread Participants: 1

Tags for this Thread