1. #1
    Sencha User
    Join Date
    Jul 2008
    Location
    Melbourne, Australia
    Posts
    71
    Vote Rating
    2
    ben_dog is on a distinguished road

      0  

    Question Moving Element to a different parent

    Moving Element to a different parent


    Hi,

    That's probably a straight forward noob question but I can't figure it out from the doc.

    Is there a way I can detach an Ext.Element from its parent and reattach it to a different parent?

    So if I have
    Code:
    elX
         elA
    
    elY
           elB
    I want to detach elA from its parent elX and attach it as a child of elY to get
    Code:
    elX
    
    elY
          elB
          elA
    Is that possible without delete elA and recreating it?

    Ben

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Location
    Melbourne, Australia
    Posts
    71
    Vote Rating
    2
    ben_dog is on a distinguished road

      0  

    Thumbs up


    aaah, append also moves. I saw the function but overlooked it as being a function to only insert elements, didn't it would move them to.

    I knew that was a noob question

    Thanks
    Ben

Thread Participants: 1