回复 1楼cingsoft的帖子
Spread WPF 锁定单元格的逻辑是先整体锁定整个表单,然后在解锁不需要锁定的单元格
测试代码如下:
- gcSpreadSheet1.Sheets[0].Cells[1, 1].Locked = false;
- gcSpreadSheet1.Sheets[0].Cells[1, 1].Text = "非锁定";
- gcSpreadSheet1.Sheets[0].Columns[3].Locked = false;
- gcSpreadSheet1.Sheets[0].Rows[5].Locked = false;
- gcSpreadSheet1.Protect = true;
- gcSpreadSheet1.Sheets[0].Protect = true;
- gcSpreadSheet1.Invalidate();
复制代码 |