不废话,直接上代码
int selectedHandle;
selectedHandle = this.gridView1.GetSelectedRows()[0];
MessageBox.Show(this.gridView1.GetRowCellValue(selectedHandle, "RoadName").ToString());
或者:
string str = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], "RoadName").ToString();
或者:
string str = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], gridView1.Columns["RoadName"]).ToString();