SpreadJS 13
SpreadJS Documentation / Sample Code / Sample Code for Frequently Used Events / Using Events when Dragging and Moving
In This Topic
    Using Events when Dragging and Moving
    In This Topic

    You can use events when dragging and dropping a block of cells.

    Using Code

    This example uses the DragDropBlock event.

    JavaScript
    Copy Code
    var spread = 
    new GC.Spread.Sheets.Workbook(document.getElementById("ss"),
    {sheetCount:3});
    
    var sheet = spread.getActiveSheet();
    sheet.bind(GC.Spread.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);
    });
    });      
    
    See Also

    Developer's Guide