SpreadJS Documentation > Sample Code > Sample Code for Frequently Used Events > Using Events when Dragging and Moving |
You can use events when dragging and dropping a block of cells.
This example uses the DragDropBlock event.
JavaScript |
Copy Code
|
---|---|
var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); sheet.bind(GcSpread.Sheets.Events.DragDropBlock, function (e, args) { console.log("From Column:" + args.fromCol); console.log("From Row:" + args.fromRow); console.log("To Column:" + args.toCol); console.log("To Row:" + args.toRow); }); }); |