2012-10-30 103 views

回答

1

您還可以設置在DataGridView爲「EditOnEnter」的編輯模式,它會做同樣的事情。它也會強制文本框列進入編輯模式。

1

通過處理cellEnter事件解決:

private void OnDGVCellEnter(object sender, DataGridViewCellEventArgs e) 
{ 
    if (e.ColumnIndex == this.colDesired.Index) 
    { 
     SendKeys.Send("{F4}"); 
    } 
}