Swap grids using ejDraggable & ejDropable

Hello,

I have a set of grids and I'm trying to be able to swap them using ejDraggable & ejDropable helpers.

This is my code:

for (var i = 0; i < zones.length; i++) {
$("#zoneHeading" + zones[i].zoneName + zones[i].zoneHour).ejDraggable({
                    distance: 100,
                    "helper": function (evt) { return $(evt.element); },
                    scope: ".cssContainer",
                    dragArea:"#container_" + zones[i+1].zoneName + zones[i+1].zoneHour
                });
                $("#container_" + zones[i].zoneName + zones[i].zoneHour).ejDroppable({ accept: ".cssContainer", scope: ".cssContainer" });
}

Each $("#zoneHeading" + zones[i].zoneName + zones[i].zoneHour) there is in fact a grid on which I have to put the draggable & droppable.
As a result of code above , I am able to drag and drop the grid but not able swap (probably because of  some wrong settings) I want to can only to swap the grids between each other not drag them everywhere on the page.

Please, advice.

Thanks,

2 Replies

IA Iulian Astalus November 15, 2017 10:24 AM UTC

In addition to that, Can I specify multiple Ids to dragArea? (or a class)

Seems doesn't work

Thanks,


VN Vignesh Natarajan Syncfusion Team November 15, 2017 04:24 PM UTC

Hi Lulian, 

Thank for using Syncfusion products. 

We have support to drag and drop the Grid rows between same Grid and different Grid. We have online sample regarding the row drag and drop. Kindly refer our online sample from the below link 


if we misunderstood your query, kindly share the following details regarding your requirement. 

1. Do you want to drag and drop the grid or grid rows? 

2. Explain your requirement briefly, it will help us to provide proper solution. 

Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon