有2个checkbox,如何写选中,未选中的事件? 这样为啥不行
有2个combox,如何写值改变的事件?
load下
FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType2 = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
comboBoxCellType2.Items = (new String[] { "未选", "已选", });
this.fpSpread1_Sheet1.Cells[7, 12].CellType= comboBoxCellType2;
comboBoxCellType2.EditorValueChanged += new EventHandler(comboBoxCellType2_EditorValueChanged);
FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType3 = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
comboBoxCellType3.Items = (new String[] { "未选", "已选", });
this.fpSpread1_Sheet1.Cells[8, 12].CellType = comboBoxCellType3;
comboBoxCellType3.EditorValueChanged += new EventHandler(comboBoxCellType3_EditorValueChanged);
----------------------------------
void comboBoxCellType2_EditorValueChanged(object sender, EventArgs e)
{
// FarPoint.Win.Spread.CellType.ComboBoxCellType test2 = sender as FarPoint.Win.Spread.CellType.ComboBoxCellType;
if (this.fpSpread1.Sheets[0].ActiveCell.Text == "已选")
{
this.fpSpread1_Sheet1.Cells.Get(17, 2).Value = 1;
}
else
{
this.fpSpread1_Sheet1.Cells.Get(18, 2).Value =0;
}
}
void comboBoxCellType3_EditorValueChanged(object sender, EventArgs e)
{
// FarPoint.Win.Spread.CellType.ComboBoxCellType test3 = sender as FarPoint.Win.Spread.CellType.ComboBoxCellType;
if (this.fpSpread1.Sheets[0].ActiveCell.Text == "已选")
{
this.fpSpread1_Sheet1.Cells.Get(17, 6).Value = 1;
}
else
{
this.fpSpread1_Sheet1.Cells.Get(18, 6).Value = 0;
}
} |
|