EasyUI Forum
April 29, 2024, 06:18:15 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 and Drop in data grid  (Read 24124 times)
rabesh
Newbie
*
Posts: 12


View Profile
« on: August 29, 2012, 10:42:02 PM »

Dear Sir/Madam

I've been using datagrids of your (Jquery EasyUI) Plugins. I need re-order the rows (NOT sort) preferably by drag and dropping and save that reording into database with new order.

Please help

I try alot to solve this but unable to solve. Is this plugins have such facility or not?

Thanks a lot in advance

Rabesh
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 30, 2012, 05:44:23 AM »

Please refer to http://www.jeasyui.com/forum/index.php?topic=625.0
Logged
rabesh
Newbie
*
Posts: 12


View Profile
« Reply #2 on: August 31, 2012, 03:17:53 AM »

How to get position of whole rows  of data grid in array after drag and drop row......
i just need only id of all datagrid after droping in new row so that i can update data in database easily
« Last Edit: August 31, 2012, 03:38:25 AM by rabesh » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 31, 2012, 04:04:03 AM »

The onDrop event can give what you want. It provide three parameters. The first is the dest row to be dropped. The second is the source row. The third is the dropped position, possible value is 'top' or 'bottom'.
Logged
rabesh
Newbie
*
Posts: 12


View Profile
« Reply #4 on: August 31, 2012, 04:51:22 AM »

But i need positions of whole rows after drag and drop as like in jqgrid so that i can save new order in the database

Drag and drop used in this site as follows:
http://trirand.com/blog/jqgrid/jqgrid.html
function(event, ui) {         
                 var new_position = $(this).sortable('toArray');  //// gives whole array after drag and drop


}
« Last Edit: August 31, 2012, 05:01:20 AM by rabesh » Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #5 on: September 04, 2013, 02:09:22 AM »

Hello
I saw datagrid-dnd.js (for datagrid drag/drop) : http://www.jeasyui.com/forum/index.php?topic=625.0
Drag/drop works fine, but when I click on row, it produces some kind of animation, like drag is cancelled (see attached image).
Same is here (on treegrid example) : http://jsfiddle.net/tjdG7/116/

How to disable this animation on mouse click?
Thanks.
« Last Edit: September 04, 2013, 03:08:29 AM by Pierre » Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #6 on: September 05, 2013, 03:09:22 AM »

Anybody, please?
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #7 on: September 09, 2013, 11:42:23 AM »

Hello all
this example still does not work well - when I click on grid, it produces some funny animation:
http://jsfiddle.net/tjdG7/116/
how to solve that?
Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #8 on: September 10, 2013, 01:33:18 AM »

Please download the 'treegrid-dnd.zip' from http://www.jeasyui.com/extension/treegrid_dnd.php.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #9 on: September 10, 2013, 01:55:42 PM »

Thanks man!
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #10 on: September 16, 2013, 11:00:28 PM »

Hello
it looks good.
Any chance for English version, at least Doc's ?
Thanks.
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!