回复 3楼dbtxwds的帖子
dbtxwds 你好,
如果初始状态相同,我们可以通过抓取 CheckBox 的点击事件来获取选中行,否则只能通过循环获取,参考代码:
- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.CheckBoxCellType ckbxcell = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
- ckbxcell.TextAlign = FarPoint.Win.ButtonTextAlign.TextRightPictLeft;
- ckbxcell.Caption = "Item Selected?";
- ckbxcell.EditorValueChanged += new EventHandler(ckbxcell_EditorValueChanged);
- fpSpread1.Sheets[0].Cells[2, 2].CellType = ckbxcell;
- }
- void ckbxcell_EditorValueChanged(object sender, EventArgs e)
- {
- }
复制代码 |