回复 7楼simonshen的帖子
simonshen 你好,
Demo 运行不起来提示什么错误呢?
提供后台代码能否解决问题:
后台:
- this.FpSpread1.Sheets[0].Rows[0].Locked = true;
复制代码
前台:
- <script language="javascript" type="text/javascript">
- <!--
- function Button1_onclick() {
- var spread = document.all("FpSpread1");
- var table = FpSpread1.all("FpSpread1_Viewport");
- var tr = table.rows(spread.ActiveRow);
- tr.bgColor = "Red";
- var iActiveRow, iActiveCol;
- //循环次数为 Spread 列数
- for (var i = 0; i < 4; i++) {
- iActiveRow = FpSpread1.ActiveRow;
- var cell = FpSpread1.GetCellByRowCol(iActiveRow, i);
- cell.setAttribute("FpCellType", "readonly");
- }
- }
- // -->
- </script>
复制代码 |