source: [view]
if(source instanceof dojox.grid.enhanced.plugins.GridDnDSource){
var ranges = dojo.map(nodes, function(node){
return source.getItem(node.id).data;
});
var item = source.getItem(nodes[0].id);
var grid = item.dndPlugin.grid;
var type = item.type[0];
var range;
try{
switch(type){
case "grid/cells":
nodes[0].innerHTML = this.getCellContent(grid, ranges[0].min, ranges[0].max) || "";
this.onDropGridCells(grid, ranges[0].min, ranges[0].max);
break;
case "grid/rows":
range = _joinToArray(ranges);
nodes[0].innerHTML = this.getRowContent(grid, range) || "";
this.onDropGridRows(grid, range);
break;
case "grid/cols":
range = _joinToArray(ranges);
nodes[0].innerHTML = this.getColumnContent(grid, range) || "";
this.onDropGridColumns(grid, range);
break;
}
if(this.insertNodesForGrid){
this.selectNone();
this.insertNodes(true, [nodes[0]], this.before, this.current);
}
item.dndPlugin.onDragOut(!copy);
}catch(e){
console.warn("GridSource.onDropExternal() error:",e);
}
}else{
this.inherited(arguments);
}