EasyUI Forum
May 21, 2024, 02:05:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Drag-Drop between 2 datagrid  (Read 10447 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« on: March 07, 2014, 12:45:36 AM »

Hello all
is there any simple example of how drag-drop between 2 datagrids?
I have solved basics, using onStartDrag and onDrop events, but how to drop into empty grid?
Thank you.
« Last Edit: March 07, 2014, 07:19:17 AM by Pierre » Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #1 on: March 10, 2014, 01:48:18 AM »

I added enableDnd property to both datagrid's and it drag/drop works, but I still don't know how to drop to empty datagrid?
Thanks.
« Last Edit: March 10, 2014, 02:15:50 AM by Pierre » Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 on: March 13, 2014, 12:03:19 AM »

Anybody, please?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: March 13, 2014, 06:39:29 AM »

Please try to download the latest file from http://jeasyui.com/extension/datagrid_dnd.php.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #4 on: March 13, 2014, 07:21:51 AM »

Hello
Thank you, it works perfect, but only for first time Sad
When I delete dropped row and if I have empty grid again, it display "not allowed" icon and drop is not possible.
Thank you again.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: March 13, 2014, 08:00:44 AM »

If the datagrid is empty, you need to call 'enableDnd' method again to make the datagrid accept dropping rows.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #6 on: March 13, 2014, 08:34:57 AM »

Yeesss.. thanks!
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #7 on: March 18, 2014, 01:03:37 AM »

Stworthy
could you please also adopt Tree to accept drop when is empty, like grid do?
Thank you.
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!