可以使用下面的代码来判断单元格是否设置了Locked = true
- function FpSpread1_SelectionChanged(event){
- var ss = FpSpread("FpSpread1");
- var table = document.getElementById("FpSpread1_viewport");
- if (table.rows[ss.ActiveRow].cells[ss.ActiveCol].hasAttribute("locked") && table.rows[ss.ActiveRow].cells[ss.ActiveCol].attributes["locked"].value == "true") {
- alert("【" + ss.ActiveRow + "," + ss.ActiveCol + "】 单元格被锁住了!!!");
- }
- }
复制代码 |