Skip to Content
Author's profile photo Karthik Arjun

Drag and Drop functionality in sap.m.List

Hi Team,

Introduction:

In computer graphical user interfaces, drag and drop is a pointing device gesture in which the user selects a virtual object by “grabbing”

it and dragging it to a different location or onto another virtual object.

In SAP UI5 control:

SAP UI5 has predefined jquery library to develop drag and drop functionality.Few of them are used here.

Drag and drop is a very common feature. It is when you “grab” an object and drag it to a different location.

Project Link: http://jsbin.com/qoxuha/edit?html,output

Code snippet:


$.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() {

$(“#lb1-listUl, #lb2-listUl”).sortable({

connectWith : “.ui-sortable”

}).disableSelection();

});

Regards,

Karthik A

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.