Dev gridcontrol获取选定行,指定列单元格的内容
//mOIDFiledName为要获取列的列名private string GetSelectOID(string mOIDFiledName){int[] pRows = this.gridView1.GetSelectedRows();//传递实体类过去 获取选中的行if (pRows.GetLength(0) > 0)return gridView1
·
//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();
作者:jiankunking 出处:http://blog.csdn.net/jiankunking
更多推荐
所有评论(0)