//創建第一個GRID
var firstGrid = new Ext
ddGroup :
store : firstGridStore
enableDragDrop : true
……其他屬性省略
});
//創建第二個GRID
var secondGrid = new Ext
ddGroup :
store : secondGridStore
enableDragDrop : true
……其他屬性省略
});
//創建第一個GRID的ddGroup
var firstGridDropTargetEl = firstGrid
var firstGridDropTarget = new Ext
ddGroup :
copy : true
notifyDrop : function(ddSource
function addRow(record
var foundItem = secondGridStore
if (foundItem ==
firstGridStore
firstGridStore
ddSource
}
}
Ext
return(true);
}
)};
//創建第二個GRID的ddGroup
var secondGridDropTargetEl = secondGrid
var secondGridDropTarget = new Ext
ddGroup :
copy : true
notifyDrop : function(ddSource
function addRow(record
var foundItem = secondGridStore
if (foundItem ==
secondGridStore
secondGridStore
ddSource
}
}
Ext
return(true);
}
});
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20244.html