日期:2014-05-17  浏览次数:20837 次

datagridview当前行
datagridview.CurrentRow.Index 等于0的时候
datagridview.Rows[10].Selected = true; 这个时候他还是选择0 怎么让当前行是第10呢?

------解决方案--------------------
DataGridView1.CurrentCell = DataGridView1.Rows[10].Cells[1]
DataGridView1.Rows[10].Selected = true;
------解决方案--------------------
DataGridView1.CurrentRow= DataGridView1.Rows[10];
DataGridView1.Rows[10].Selected = true;
------解决方案--------------------
dataGridView1.CurrentCell = dataGridView1.Rows[1].Cells[0];
有这一句就够了,另外2楼在想当然
------解决方案--------------------
2楼正解