我有一個DataGridView,我想創建一個事件處理程序來雙擊單個單元格。我試圖添加一個Windows.Forms.DataGridViewCellEventHandler到DataGridView.DoubleClick事件,但它只會接受一個System.EventHandler。一個簡單的類型轉換似乎不工作:表格DataGridView事件
this.song_grid.DoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.cell_doubleclick);
可能有人請告訴我讓我的DataGridView接受DataGridViewCellEventHandler的最佳方式?提前致謝。
我認爲你正在尋找'song_grid.CellDoubleClick + = cell_doubleclick '。 –