第0行第0列的值
datagridview.row[0].cell[0].value
如果你要读一行的值
可以用个for语句实现.
string strReceiveData;//接收数据
foreach(DataGridViewRow dr in dataGridView1.Rows)
{
strReceiveData = dr.Cells["列名"].Value.ToString();
}
DataTable
dt=(DataTable)this.datagridview.DataSource;
for(int
i=0;i
string
name=dt.rows[i]["Name"].ToString();
}
DataTable dt=(DataTable)this.datagridview.DataSource;
for(int i=0;i
string name=dt.rows[i]["Name"].ToString();
}