Jump to content
uniGUI Discussion Forums
herculanojs

Drag on Drop Treeview

Recommended Posts

Hi,

 

Yes it is possible, but you should think about synchronization with the server

function beforeInit(sender, config) {
    config.viewConfig = {
        plugins: {
            ptype: 'treeviewdragdrop'
        }
    };
}

Best regards,

Share this post


Link to post
Share on other sites

Hi,

 

Yes it is possible, but you should think about synchronization with the server

function beforeInit(sender, config) {
    config.viewConfig = {
        plugins: {
            ptype: 'treeviewdragdrop'
        }
    };
}

Best regards,

How could you make it so that in ondrag drop it could be added as no child in another?

Share this post


Link to post
Share on other sites

How can I capture the Dragdrop event?

 

function beforeInit(sender, config) {
    config.viewConfig = {
        plugins: {
            ptype: 'treeviewdragdrop'
        }
    };
}

 

 

O código acima apenas permite o drag de uma posição superior/inferior. Necessito mover nós entre níveis. Colocar um nó dentre de outro. 

Como posso capturar o nó que esta sendo movido, e sobre qual nó esta sendo sobreposto.
 
The above code only allows drag from an upper / lower position. I need to move knots between levels. Put one knot from another.
How can I capture the node being moved, and which node is being overlapped.
 
in vlc
 
procedure TfrmGrupo.trvMenuDragDrop(Sender, Source: TObject;
  X, Y: Integer);
var
  AnItem: TTreeNode;
   AttachMode: TNodeAttachMode;
   HT: THitTests;
begin
     if trvMenu.Selected = nil then Exit;
        HT := trvMenu.GetHitTestInfoAt(X, Y) ;
     AnItem := trvMenu.GetNodeAt(X, Y) ;
     if (HT - [htOnItem, htOnIcon, htNowhere, htOnIndent]<> HT) then
     begin
          if (htOnItem in HT) or (htOnIcon in HT) then
             AttachMode := naAddChild
          else
          if htNowhere in HT then
             AttachMode := naAdd
          else
          if htOnIndent in HT then
             AttachMode := naInsert;
 
          trvMenu.Selected.MoveTo(AnItem, AttachMode);
 
   end;
end;

Share this post


Link to post
Share on other sites

Hi,

 

Yes it is possible, but you should think about synchronization with the server

function beforeInit(sender, config) {
    config.viewConfig = {
        plugins: {
            ptype: 'treeviewdragdrop'
        }
    };
}

Best regards,

I need to drag dragdrop between us, putting one inside of others, with all his children if they have. How can I do this? I did not find anything in the forum

Share this post


Link to post
Share on other sites

Hi,

 

I need to drag dragdrop between us, putting one inside of others, with all his children if they have. How can I do this? I did not find anything in the forum

 

Need to analyze

Share this post


Link to post
Share on other sites

OK, we have to deal with accounting plans, and it's tricky to deal with it without this option, as there are multiple levels of accounts, which can be changed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×