110,502
社区成员
发帖
与我相关
我的任务
分享
protected void grv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");
e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");
string PKEY = grvList.DataKeys[e.Row.RowIndex].Value.ToString() ;
e.Row.Attributes["style"] = "Cursor:hand";
string cal_url = "将要跳转到的页面?传过去的参数=" + Server.UrlEncode(PKEY) + "";
e.Row.Attributes.Add("ondblclick", "document.location.href='" + cal_url + "'");
}
}