EasyUI Forum
September 13, 2025, 04:33:25 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: drag from datagrid frozen column to normal column [solved]  (Read 7373 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: November 14, 2014, 08:36:05 PM »

I have almost finished a design for dragging and dropping cell contents and needed to make 2 of the columns frozen, one of them is the source column where the items get dragged from.

I thought this would be simple, but unfortunately it is not and the frozen columns seems to interfere with the drag and drop process.

When I drag an item from the frozen column, it gets hidden behind the normal columns as you drag it and disappears.

I have tried setting the z-index of the item being dragged but that makes no difference.

How can this be fixed ?
« Last Edit: November 14, 2014, 11:58:38 PM by devnull » Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 14, 2014, 11:32:16 PM »

When drag a cell from the frozen columns, the dragging proxy should be append to <body>. Please refer to the following code.
Code:
$('#dg').datagrid({
onLoadSuccess: function(){
var dc = $(this).data('datagrid').dc;
dc.body1.find('div.datagrid-cell').draggable({
revert: true,
proxy: function(source){
var p = $('<div></div>').appendTo('body');
p.html($(source).html());
p.attr('class', $(source).attr('class'));
p.attr('style', $(source).attr('style'));
p.css('border', '1px solid #ccc');
return p;
}
})
}
})
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: November 14, 2014, 11:58:19 PM »

Thanks so much, that has fixed it.

Logged

-- Licensed User --
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!