cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the Draggable element to get visible on top of all the element in the screen while dragging?

Former Member
0 Kudos

Hi All,

I am having a requirement to implement the drag and drop feature in SAPUI5 Table and Tree Table.

I am having a table with set of names which should be able to drag and a Tree Table which should accept the dragging object, so it is defined as a drop area.

I Used JqueryUI to make the controls as drag and drop which is working fine.

Ques 1.jpg

Ques 2.jpg

Ques 3.jpg

The problem is when I drag the name towards the Tree Table it is getting hide behind the table which makes the user confused.

When I go through the code, I found out that this issue occurs due to the position related to CSS, which is applied default in SAPUI5.

Ques 4.jpg

Ques 5.jpg

Ques 6.jpg

code for drag and drop is below


var oMemberId;
$
(".selector Table").draggable({
  helper
: "clone",
  cursor
: "pointer",
  revert
: "invalid", 
  zIndex
: 9999,
  start
: function(event) {
  oSelectedId
= this.parentNode.previousSibling.firstChild.childNodes[0].value;
  
}
}).disableSelection();  

$
(".selector treetable").droppable({
  drop
: function(event){
  
var dataLevel=(this.attributes["data-sap-ui-level"].value);
  
var oDropAreaId = this.childNodes[2].textContent;
  
}
}).disableSelection();


Please provide me an alternative solution.

Thanks in advance,

Aravindh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

var oMemberId;
$
(".selector Table").draggable({
  helper
: "clone",
  cursor
: "pointer",
  revert
: "invalid", 
  zIndex
: 9999,
  start
: function(event) {
oSelectedId
=this.parentNode.previousSibling.firstChild.childNodes[0].value;
  
},

  drag: function(event) {
$(".selector Table div.sapUiTableCnt,.selector Table div.sapUiTableCtrlScr").css("overflow","visible");

  
},


}).disableSelection();  

srinujava
Participant
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

Former Member
0 Kudos

zIndex of table is 9999 which might be causing this problem. The zIndex  value of what you drag must be greater than that of the table so that it appears above the table.

Regards

Sakthivel

Former Member
0 Kudos

Hi Sakthivel,

The other controls in the screen does not have zIndex.

Former Member
0 Kudos

then try adding z-index for the control which you wanted to appear above the table.