自己备份转载,看到的人请感谢原创---皮皮狗
// 单元格编辑结束,焦点离开或者按回车键时
//比如:你要判断当前单元格输入内容是否合法。
private void fpSpread1_EditModeOff(object sender, System.EventArgs e)
{
}
// 单元格得到焦点时触发
private void fpSpread1_EnterCell(object sender, FarPoint.Win.Spread.EnterCellEventArgs e)
{
}
// 编辑单元格时触发,单元格内容发生改变
private void fpSpread1_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
}
// 编辑模式开始时触发
private void fpSpread1_EditModeOn(object sender, System.EventArgs e)
{
}
// 单元格失去焦点时触发
private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
{
if (this.spdSetList.ActiveSheet.RowCount == 0)
return;
}
// 双击Spread时触发,一般用来付值,比如把选中行内容传给其他控件
private void fpSpread1_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
}
// 单击Spread时触发,一般用来改变选中行的颜色
private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
}
// 一般用来检测输入内容是否合法,比如检测输入的内容是否是数字
private void fpSpread1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar >= '0' && e.KeyChar <= '9' || e.KeyChar == 8 || e.KeyChar == 13)
e.Handled = false;
else
e.Handled = true;
}
// 用来捕捉按钮列等属于按钮范畴的事件
private void spdSetList_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
}