SpreadJS Documentation > Sample Code > Sample Code for Range Grouping > Adding and Deleting Outlines |
You can add and delete outlines in range grouping.
This example adds and deletes outlines.
JavaScript |
Copy Code
|
---|---|
$("#button1").click(function () { var activeSheet = $("#ss").data("spread").getActiveSheet(); activeSheet.isPaintSuspended(true); //Set Outline of row activeSheet.rowRangeGroup.group(0, 4); activeSheet.rowRangeGroup.group(0, 1); activeSheet.rowRangeGroup.group(2, 1); //Set Outline of column activeSheet.colRangeGroup.group(0, 4); activeSheet.colRangeGroup.group(0, 1); activeSheet.colRangeGroup.group(2, 1); activeSheet.isPaintSuspended(false); }); $("#button2").click(function(){ var activeSheet = $("#ss").data("spread").getActiveSheet(); activeSheet.isPaintSuspended(true); //Remove Outline of row activeSheet.rowRangeGroup.ungroupRange(0, 4); activeSheet.rowRangeGroup.ungroupRange(0, 1); activeSheet.rowRangeGroup.ungroupRange(2, 1); //Remove Outline of column activeSheet.colRangeGroup.ungroupRange(0, 4); activeSheet.colRangeGroup.ungroupRange(0, 1); activeSheet.colRangeGroup.ungroupRange(2, 1); activeSheet.isPaintSuspended(false); }); |