您是想在编辑结束后您是想在回车后对数据进行处理然后再展示出来吗?
那如果是编辑后点击其他单元格退出编辑状态需要处理吗?如果也需要处理您可以在EditModeOff事件中处理。
如果只有回车才处理,那您可以自己实现一个activon
- public class CheckValueAction : FarPoint.Win.Spread.Action
- {
- public override void PerformAction(object source)
- {
- if (source is SpreadView)
- {
- SpreadView spread = (SpreadView)source;
- SheetView sheet = spread.Sheets[spread.ActiveSheetIndex];
- spread.EditMode = false;
- var value = sheet.ActiveCell.Value;
- if (value != null)
- {
- sheet.ActiveCell.Value = value.ToString() + "dd";
- }
- }
- }
- }
复制代码- FarPoint.Win.Spread.InputMap im;
- ActionMap am = fpSpread1.GetActionMap();
- am.Put("CheckValue", new CheckValueAction());
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
- im.Remove(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None));
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), "CheckValue");
复制代码
|