Hybrid View

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    10
    Vote Rating
    0
    strattonbrazil is on a distinguished road

      0  

    Default Answered: dragging a treepanel node onto a regular panel

    Answered: dragging a treepanel node onto a regular panel


    How does one handle a drop event from a treepanel to a normal panel? I've seen many examples using treepanels to gridpanels, but nothing related to normal panels, which don't seem to have a special plugin.

    What I'd like to do is drag a leaf node from my treepanel onto another panel and have it fire some event with meaningful data (where it was dropped, the node info, etc.)

    I currently have code for the treepanel that looks like it would be draggable, but I can't find any examples of handling the actual drop.
    Code:
                           viewConfig: {
                           allowCopy: true,
                           copy: true,
                           plugins:{
                               ptype: 'treeviewdragdrop',
                               dragGroup: 'dragGroup',
                               dragText: 'Drag into panel',
                           }
                           },
    I figured the code would look something like this, but I can't find any docs for handling the event or even if Panel needs a special plugin like treepanel and gridpanel do. I just want access to a function that fires when something is dropped onto the panel with the item info.
    Code:
            var panel = Ext.create('Ext.panel.Panel', {
                           title: 'foo',
                           width: 200,
                           html: '<p>World!</p>',
                           viewConfig: {
                           plugins:{
                               dropGroup: 'dragGroup'
                           }
                           }
                     });
    Is there some existing function on the panel xtype I can just include or is it much more complicated then that? Thanks.

  2. Hi,

    you can see this link :http://examples.extjs.eu/

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,

    you can see this link :http://examples.extjs.eu/
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

Thread Participants: 1

Tags for this Thread