日期:2014-05-18  浏览次数:20868 次

DataGridView 点击行头 选中第一列
DataGridView 如何实现点击行头,选中当前行第一列单元格?

------解决方案--------------------
C# code

 private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            dataGridView1.Rows[e.RowIndex].Cells[0].Selected = true;
        }

------解决方案--------------------
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
dataGridView1.Rows[e.RowIndex].Cells[0].Selected = true;
}