您好,
非常抱歉,目前只能通过一个自定义的方法来实现
1.通过判断点击了第一列的表头部分
2.改变check的状态- bool isChecked;
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- isChecked = true;
- FarPoint.Win.Spread.CellType.CheckBoxCellType checkType = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
- this.fpSpread1.Sheets[0].Cells[0, 0].CellType = checkType;
- this.fpSpread1.Sheets[0].Cells[1, 0].CellType = checkType;
- }
- private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
- {
- if (e.ColumnHeader && (e.Column == 0))
- {
-
- for (int i = 0; i < 2; i++)
- {
- this.fpSpread1.Sheets[0].Cells[i, 0].Value = isChecked;
- }
- isChecked = !isChecked;
- }
- }
复制代码 |