int rows = dataGridView1.indexrows;//获得选种行的索引 string str = dataGridView1.rows[rows].cells[num].text;//获取第rows行的索引为num列的值