1.在Gridview的事件RowDataBound中添加
if(e.Row.RowType==DataControlRowType.DataRow)
{
e.Row.Attributes["OnClick"]=ClientScript.GetPostBackEventReference(e.Row.Parent.Patent,"Select$"+e.Row.RowIndex);
}
1.在Gridview的事件RowDataBound中添加
if(e.Row.RowType==DataControlRowType.DataRow)
{
e.Row.Attributes["OnClick"]=ClientScript.GetPostBackEventReference(e.Row.Parent.Patent,"Select$"+e.Row.RowIndex);
}
转载于:https://www.cnblogs.com/xuebingz/archive/2011/08/03/2126282.html