Spread.Sheets Documentation
Creating and Removing Selections

You can create or remove selections.

Using Code

This example creates and removes selections.

JavaScript
Copy Code

window.onload = function(){
       var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
       var activeSheet = spread.getActiveSheet();

activeSheet.setColumnCount(5);

     $("#button1").click(function(){
         //Select entire row 4.
        activeSheet.addSelection(3, -1, 1, -1);
     });

     $("#button2").click(function(){
         //Remove the selections in the sheet.
         activeSheet.clearSelection();
     });
                      }

See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.