删除掉默认的keymap ,然后在合适的时机自己加上
- Dictionary<GrapeCity.Windows.SpreadSheet.UI.KeyStroke, GrapeCity.Windows.SpreadSheet.UI.SpreadAction> keyMap = Spreadsheet1.View.KeyMap;
- var tabKey = keyMap.First(k => k.Key.KeyCode == Key.Tab);
- keyMap.Remove(tabKey.Key);
- keyMap.Add(new GrapeCity.Windows.SpreadSheet.UI.KeyStroke(Key.Tab, ModifierKeys.None), (sender, e) =>
- {
- var sheet = sender as SheetView;
- int myCellRow = 3, myCellCol = 3;
- sheet.SetActiveCell(myCellRow, myCellCol, true);
- });
复制代码 |