開発環境はMicrosoft Visual C# 2008 Express Editionです。タイトルどおり、DataGridViewで右クリックで行を選択したいのですが、選択できません。いろいろ探した結果、private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { dataGridView1.ClearSelection(); dataGridView1.Rows[e.RowIndex].Selected = true; } }で、できるらしいですが、デバック開始をしたら、作業を完了できません。エラーが特定できませんでした。などでます。どうしたらいいですか??
- Child Tree -