Drag grid item to another grid
Moderator: Rathinagiri
-
- Posts: 682
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Drag grid item to another grid
Hey Edward. What a great job. Excelente and usefull implementación. Congratulaciones.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Drag grid item to another grid
We have many contribution code like this;edk wrote: ↑Fri Jan 11, 2019 1:50 pm As promised here is the next version.
Added:
- support for Ctrl and Shift while dragging and dropping.
With the Shift key, you can move items by changing the position in the tree, with the Ctrl key we perform a copy operation.
- handling the context menu when dropping the right mouse button on tree # 2 (Copy / Move)
- handling the context menu of tree # 2 (on the tree item/node: Rename / Delete / Add as child ; in the empty tree space: Add New As Root )
- there is a new method for the tree: InsertItem
As I did not integrate this method with HMG sources, we call it as a function: _InsertItem (ControlName, FormName, cValue, nInsertPos, [aImage], [Id]).
Now you can build a tree using the context menu.![]()
Tree.gif
DragAndDrop_0.006.zip
Enjoy.
thanks to these successful participants.
Sadly adding this useful codes to the core of HMG not likely in the near future
![Sad :(](./images/smilies/icon_e_sad.gif)
there isn't a way adding them to next releases of HMG under a new section namely such "contributions"
![Question :?:](./images/smilies/icon_question.gif)
Viva HMG, builder, developers, contributors, participants and followers
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Viva INTERNATIONAL HMG ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Drag grid item to another grid
We have no leader now, who will create new versions.
It's really sad.
Thanks Edward for your great work!
It's really sad.
Thanks Edward for your great work!
Re: Drag grid item to another grid
A small bug fix when adding / inserting a node to the root of the tree.
Re: Drag grid item to another grid
In last sample, when I move Item 2.2.8 to Item 2.2.7 - look ok, but when I drag Item 2.2.7 to Item 2.2 (its parent - nothing should happened) Item 2.2.8 is lost
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Drag grid item to another grid
Thanks Edward ! And no need to apologize !!!
Serge
Serge
There's nothing you can do that can't be done...
Re: Drag grid item to another grid
Sample for a tree that uses IDs.
Unfortunately, in this variant there are constraints based on the necessity of assigning new IDs when copying/adding tree elements. Also, you would need to give ID for elements dragged from other controls like textbox or from other trees, which is why these functionalities have been removed. (DragAndDrop.prg is untouched)
Unfortunately, in this variant there are constraints based on the necessity of assigning new IDs when copying/adding tree elements. Also, you would need to give ID for elements dragged from other controls like textbox or from other trees, which is why these functionalities have been removed. (DragAndDrop.prg is untouched)