Jump to content


Photo

Drag on Drop Treeview


  • Please log in to reply
12 replies to this topic

#1 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 31 May 2017 - 06:55 PM

Hi

 

Would anyone have an example of how to do Drag Drop in a TUniTreeview

 

It would be possible ?
 
Tanks

  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5011 posts

Posted 01 June 2017 - 06:17 PM

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,


  • 0

#3 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 01 June 2017 - 06:20 PM

thank you


  • 0

#4 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 06 June 2017 - 10:08 PM

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?


  • 0

#5 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 08 June 2017 - 07:20 PM

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;

  • 0

#6 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 09 June 2017 - 03:08 AM

I need the dragdrop features contained in these examples

How can I achieve this with Unitreevew ?

 

http://demos.shieldu...w/drag-and-drop

 

http://demos.telerik...eeview/dragdrop


  • 0

#7 gerhardhziegler

gerhardhziegler

    Member

  • uniGUI Subscriber
  • PipPip
  • 45 posts
  • LocationVienna and Berlin

Posted 19 July 2017 - 02:38 PM

looks like, we have the same problems...


  • 0

#8 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 27 October 2017 - 01:31 PM

Does anyone have a solution for this situation?

Move an entire node with your children to another point, or to another node


  • 0

#9 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 13 December 2017 - 03:29 AM

We still have no solution to the problem. Does anyone have a solution?


  • 0

#10 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 19 December 2017 - 01:28 PM

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


  • 0

#11 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 10 January 2018 - 06:49 AM

Please, would there be any solution to the case


  • 0

#12 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5011 posts

Posted 10 January 2018 - 09:45 AM

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


  • 0

#13 herculanojs

herculanojs

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 458 posts
  • LocationCuiabá-Brasil

Posted 10 January 2018 - 01:29 PM

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.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users