答案 0 :(得分:2)
像这样添加RowDataBound
protected void Gridview_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(gridview, "Select$" + e.Row.RowIndex);
}
}
您可以通过索引为单元格1 {/ 1}提供单元格
您可以获得此类<{p}}的任何e.Row.Cells[1]
selected
值
row cell