//mOIDFiledName为要获取列的列名
private string GetSelectOID(string mOIDFiledName)
{
int[] pRows = this.gridView1.GetSelectedRows();//传递实体类过去 获取选中的行
if (pRows.GetLength(0) > 0)
return gridView1.GetRowCellValue(pRows[0], mOIDFiledName).ToString ();
else
return null;
}小注:获取GridView中所有的选中的行号
int[] iRowId = this.gridData.gridView1.GetSelectedRows();
GridView选中行数据获取
本文介绍了一种从GridView中获取选中行特定列数据的方法。通过使用实体类传递选中的行号,可以轻松实现对指定列数据的读取。
5146

被折叠的 条评论
为什么被折叠?



