SpreadJS Documentation > Sample Code > Sample Code for Cells > Allowing Drag and Drop |
You can allow the user to drag and drop cells.
This example allows drag and drop.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); //Enable drag and drop of cells spread.canUserDragDrop(true); sheet.getColumn(0).cellType(new GcSpread.Sheets.TextCellType()); sheet.setValue(0, 0, "Text"); }); |