2011-12-15 41 views

回答

0

嘗試訂閱到CellMouseDown事件:

private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { 
    if (e.Button == MouseButtons.Right && e.RowIndex >=0) 
    dataGridView1.Rows[e.RowIndex].Selected = true; 
} 
相關問題