none
invoke DoubleClick event RRS feed

  • Question

  • Hi,

    I have gridPatients_DoubleClick in my application which has a code inside it.

    I want to use the same code in gridPatients_KeyDown

    using C#, How can I call the gridPatients_DoubleClick from gridPatients_KeyDown?

    Sunday, October 7, 2012 7:02 PM

Answers

  • You should refactor code from gridPatients_DoubleClick to own method and then call that method from gridPatients_DoubleClick and gridPatients_KeyDown.

    Of course you can call event handler from another event handler, you can use this as sender and pass emty event arguments, but I would recommend refactoring code used by both event handlers to own method.


    Sunday, October 7, 2012 7:18 PM