Drag to Same Folder

I’ve two Grids in the page, I dragging one Object from the First grid to Second Grid, I want to copy the Object in the same Folder Name, I am having Same Folders in the Source Grid and in the Target Grid for some of the Trees, If I am not having the same folder name eveenthough am trying to drag it should give an alert, if it contains the same folder names, if i dragged the object to the parent node it should be copied in the same folder in the target grid.

The grid doesn’t contain solution for such scenarious, but it can be implemented through using onDrag event

grid.attachEvent(“onDrag”,function(sid,tid,sgrid,tgrid){
    var pid=sgrid.getParentId(sid);
    if (typeof tgrid.getRowIndex(pid) != “undefined”){
          this.dragContext.tid=pid;
          this.dragContext.dropmode=“child”;
          return true;
    }
    else alert(“There is no related parent”);
    return false;
});