-4

我想从一个单元格复制并粘贴到另一个单元格/C1FlexGrid 从选定的红色单元格复制并在此处粘贴其他值 - 显示的图像

从选定的红细胞复制/图像在这里

在此处输入图像描述

有没有什么活动之类KeyDown

任何示例代码?

4

1 回答 1

0

在这种情况下,事件KeyDown/KeyPress/KeyUp将不起作用,因为您的 FlexGrid 处于编辑模式。当处于编辑模式时,尝试对 FlexGrid 使用KeyDownEdit/KeyPressEdit/KeyUpEdit事件。

VB.NET

Private Sub C1FlexGrid1_KeyPressEdit(sender As Object, e As KeyPressEditEventArgs)
Handles c1FlexGrid1.KeyPressEdit
    'Implement logic here
End Sub

C#:

public Form1()
    {
        this.c1FlexGrid1.KeyPressEdit += new KeyPressEditEventHandler(this.c1FlexGrid1_KeyPressEdit);
    }

    private void c1FlexGrid1_KeyPressEdit(object sender, KeyPressEditEventArgs e)
    {
       // Implement logic here
    }

但是,我建议您使用ValidateEdit事件来实现您的用例。

于 2014-09-23T06:08:29.020 回答