jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › Validator, Drag & Drop, Sortable › Drop from a Grid into a Tree in a Note
Tagged: grid dragdrop, jquery table dragdrop, tree dragdrop
This topic contains 4 replies, has 4 voices, and was last updated by Peter Stoev 12 years, 1 month ago.
-
Author
-
Hello together,
I am new in this topic, I searched a long time, but I do not find the correct solution for me.
I have to implement a small File Explorer. So I have on the left handside a Tree and on the right one a Grid component.
Now I want to move some contents from the grid into the tree by Drag and Drop mechanism.Therefore I have this lines of code
gridCells.bind('dragEnd', function (event) { var value = $(this).text(); var item = $('#jqxTree').jqxTree('getSelectedItem'); var treeItems = $("#jqxTree").jqxTree('getItems'); var firstItem = treeItems[0]; var firstItemElement = firstItem.element; $('#jqxTree').jqxTree('addTo', { label: value }, firstItemElement); });
My target is to move the element in the node where the user end his drop Operation. But I do not know how I get this position / the note. Because of this I add the element at the moment always at the same place.
Is there an easy way to get my target note?Sorry for my english… I am not a native speaker.
Hi Hochdahler86,
We don’t have built-in API for getting a Tree item under the mouse cursor. I will create a work item about this missing functionality and we will add it in a future version of jQWidgets.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI would really really appreciate this feature as well, being able to drop onto a specific item in the tree. Probably with a similar API implementation as exists for jqxGrid, as in
.jqxGrid('getcellatposition',x,y)
Is there any change this API feature has already been implemented for the jqxtree?
Right now i’ll look into the option of determining the correct treeview item, based on calculating amount of pixels of the mousepointer position in comparison to the the top of the treeview (knowing how much vertical space each item in the treeview will take up), but that might end up in being very unreliable/unusable.
I’d really like to not having to replace the treeview implementation i am using now by a grid though, that will sacrifice usability.
THank you for a wonderful product!
I am also looking to implement this functionality. In my case I don’t even need the views to be updated. For example, when I drag an item from my grid and drop it onto the tree I want to add the dragged item to a list in my database, not actually add a node in my tree (nor do I want the dragged item removed from the grid, it will simply revert).
The problem is I can not identify the node in the tree that I am dropping onto.
Any progress with this issue???
Hi,
Unfortunately, we still do not have such API available in jqxTree.
Best Regards,
Peter StoevjQWIdgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.