EasyUI Forum
November 30, 2025, 02:10:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] DragDrop from other treegrid  (Read 8474 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« on: April 18, 2016, 04:25:50 AM »

Hello all
I have many datagrid's and treegrid's - how to accept drop only from specified treegrid?
For Example I have #aa tregrid and #bb treegrid - I want to allow only drop from aa to bb.
I just tried to search the forum but it does not work - it looks like formum search is corrupted.
Thank you.
« Last Edit: April 18, 2016, 09:52:56 AM by Pierre » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 18, 2016, 09:02:02 AM »

Please look at this topic:
http://www.jeasyui.com/forum/index.php?topic=5430.0

or use the 'dropAccept' property to constrain the dropping nodes.
Code:
<div class="aa">
<table id="aa" class="easyui-treegrid">
...
</table>
</div>
<table id="bb" class="easyui-treegrid"
data-options="
dropAccept: '.aa tr[node-id]',
onLoadSuccess: function(row){
$(this).treegrid('enableDnd', row?row.id:null);
}
">
</table>
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 on: April 18, 2016, 09:52:40 AM »

Great thank you - key is in this line:
dropAccept: '.aa tr[node-id]'
because I didn't know what is meant by "selector"..
Thank's again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!