XtraGrid gridview 获取选中行的值

//修改
private void amend_Click_(object sender, EventArgs e)
{
string strSelected = "";
int selectFlag = this.gridView1.GetSelectedRows()[0];//当前选中的列
strSelected += gridView1.GetRowCellValue(selectFlag, "CardNumStart");//取得选中行的某个单元格的值(“CardNumStart”代表属性字段)

MessageBox.show(strSelected)

}

你可能感兴趣的:(GridView)