SpreadJS 13
SpreadJS Documentation / Sample Code / Sample Code for Cells / Allowing Drag and Drop
In This Topic
    Allowing Drag and Drop
    In This Topic

    You can allow the user to drag and drop cells.

    Using Code

    This example allows drag and drop.

    JavaScript
    Copy Code
    $(document).ready(function ()
    {
        var spread =
        new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
        var sheet = spread.getActiveSheet();
        
        // Enable drag and drop of cells
        spread.options.allowUserDragDrop = true;
        sheet.setValue(0, 0, "Text");
    });
    
    See Also

    Developer's Guide