invoke DoubleClick event
-
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?
-
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?
Try the following approach - anything else is unclean:
private void gridPatients_DoubleClick(object sender, System.EventArgs e)
{
DoStuff();
}private void gridPatients_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
DoStuff();
}private void DoStuff()
{
//do the things that you want to do in KeyDown and DoubleClick
} -
Try the following approach - anything else is unclean:
private void gridPatients_DoubleClick(object sender, System.EventArgs e)
{
DoStuff();
}private void gridPatients_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
DoStuff();
}private void DoStuff()
{
//do the things that you want to do in KeyDown and DoubleClick
}