SpreadJS Documentation > Sample Code > Sample Code for Rows and Columns > Setting Fixed or Frozen Rows and Columns |
You can freeze columns and rows.
This example freezes two columns and two rows.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var activeSheet = spread.getActiveSheet(); // Fix 2 columns from left and 2 rows from top. activeSheet.setFrozenRowCount(2); activeSheet.setFrozenColumnCount(2); activeSheet.getRows(0, 1).backColor("LightCyan"); activeSheet.getColumns(0, 1).backColor("LightCyan"); }); |