I\'m trying to add some specific behavior to a datagridview
control (if you can put it like that).
I would like to have a multiplelines
Sorry for the C# syntax. But I guess the event exists also in VB.NET.
I would suggest to use the KeyDown
event:
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.Enter)
{
MessageBox.Show("I have been Executed!");
}
}
this works for me catching keyboard input when the DataGridView
has focus.