-4

I want to copy and paste from one cell to another / C1FlexGrid copy from selected red cell and paste other value here - shown image

copy from selected red cell/ Image is here

enter image description here

Is there any event like KeyDown etc

Any example code ?

AbdiasM
  • 613
  • 4
  • 15

1 Answers1

0

The events KeyDown/KeyPress/KeyUp wont work in this case since your FlexGrid is in edit mode. When in edit mode try using KeyDownEdit/KeyPressEdit/KeyUpEdit events for the FlexGrid.

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
    }

However, I would suggest you to use ValidateEdit event to implement your use case.

Nilay Vishwakarma
  • 3,105
  • 1
  • 27
  • 48