Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Draggable not working in Table

$
0
0

Hi All,

 

I am having a table. I wan to make the each row of the table as a draggable. When I tried a sample it works fine but its not working in the application. Please see the below code and correct me if I am wrong.

 

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-core');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-widget');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-mouse');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-draggable');

$.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-sortable');

 

$(function(){

 

  $("tr[id^='tblChildren-rows-row']").draggable({

  connectToSortable: ".ui-sortable",

  revert:true,

  helper:"clone",

  start: function(event,ui){

  var selectedNode = event.srcElement.innerText;

  console.log(selectedNode + " dragged");

  },

  stop: function(event, ui){

  console.log("drag stops");

  }

  });

  

  });

 

Regards,

Aravindh


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>