SpreadJS Documentation > Sample Code > Sample Code for Cells > Creating Multiple Selections |
You can create multiple selections.
This example creates multiple selections.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); //Allow selection of multiple ranges sheet.selectionPolicy(GcSpread.Sheets.SelectionPolicy.MultiRange); //Create two different selection ranges. sheet.addSelection(0, 0, 2, 2); sheet.addSelection(3, 3, 2, 2); }); |