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]);
}
}
};
}
Gravar_2023_08_17_18_38_21_171.mp4