已实现,谢谢!!! :strong:- //键盘录入时触发命令,此命令用于修改C1FlexGrid的ctrl+c复制事件
- protected void c1FlexGrid_PreviewKeyDown(object sender, KeyEventArgs e)
- {
- if (e.Key != Key.C || Keyboard.Modifiers != ModifierKeys.Control) return;
- var grid = sender as C1FlexGrid;
- if (grid != null)
- {
- var cr = grid.Selection;
- Clipboard.SetDataObject(grid[cr.Row, cr.Column], false);
- }
- e.Handled = true;
- }
复制代码 |