回复 2楼vbagcl的帖子
- private void ss1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
- {
- if (e.Column == 0)
- {
- return;
- }
- object value = ss1_Sheet1.Cells[e.Row, 1].Value;
- if (value == null || value.ToString() == "False")
- {
- ss1_Sheet1.Cells[e.Row, 1].Text = "True";
- ss1_Sheet1.Cells[e.Row, 0].Value = true;
- }
- else
- {
- ss1_Sheet1.Cells[e.Row, 1].Text = "False";
- ss1_Sheet1.Cells[e.Row, 0].Value = false;
- }
- }
- private void ss1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- object value = ss1_Sheet1.Cells[e.Row, 0].Value;
- if (value == null || value.ToString() == bool.FalseString)
- {
- ss1_Sheet1.Cells[e.Row, 1].Text = "False";
- }
- else if (value.ToString() == bool.TrueString)
- {
- ss1_Sheet1.Cells[e.Row, 1].Text = "True";
- }
- }
复制代码 |