Jump to content

uniTreeNode Drag and Drop in a uniTreeView


josauro@casasoft.net.br

Recommended Posts

Hi I put this code in a UnitreeView, de drag an drop work fine, but, how could I know in delphi where de parent node they are droped ? I need to update de BD with new targed node parent. Look the video attached.

 

function beforeInit(sender, config)
{
    config.viewConfig = {
        plugins: {
            ptype: 'treeviewdragdrop',
            ddGroup: 'tree2panel',
            dragText : 'Movendo....',
            enableDrag : true,
            enableDrop : true,
            appendOnly: false
             },
        listeners: {
            beforedrop: function(node, data, overModel, dropPos, opts) {
                
            },
            drop: function(node, data, overModel, dropPos, opts) {
       ajaxRequest(sender, 'dropped', ['data='+data.records[0].data,
       'id='+data.records[0].data.id,
       'opts='+opts,
       'text='+data.records[0].data.text]);
                              
         
            }

        }
    };
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...