你点中的话,就用选中行的第一行,这就可以,this.datagridview.selectedrows[0].cells[0]
我做过Web的,看看你能不能借鉴一下,很简单的:
DataList的ItemCommand事件
protected void DlExamScore_ItemCommand(object source, DataListCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument.ToString());
}