DataGridView keydown event not working in C#

前端 未结 5 680
北恋
北恋 2020-11-28 11:02

DataGridView keydown event is not working when I am editing text inside a cell.

I am assigning shortcut Alt+S to save the data, it works when cell

5条回答
  •  忘掉有多难
    2020-11-28 11:16

    use PreviewKeyDown event

    private void dataGridView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
    {
    
    }
    

提交回复
热议问题