<SCRIPT language="javascript">
function showGZNR(gznr){
var w=window.open("about:blank","_blank","width=560px,height=350px,location=0,toolbar=0,menubar=0,scrollbars=1,directories=0,status=0,left="+(screen.availWidth-520)/2+",top="+(screen.availHeight-280)/2);
w.document.write("<html><head><title>详细内容<");
w.document.write("/");
w.document.write("title><");
w.document.write("/");
w.document.write("head><body style=\"font-size:13px;LINE-HEIGHT:20px\"><div>");
w.document.write(" "+gznr);
w.document.write("</body></html>");
}
</SCRIPT>
.cs
private void Sggrid3_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Item||e.Item.ItemType==ListItemType.AlternatingItem)
{
e.Item.Cells[0].Visible=false;
DataRowView dr=(DataRowView)e.Item.DataItem;
e.Item.Cells[8].Text=GetRowFieldValue(dr,"DRJS");
e.Item.Cells[9].Text=GetRowFieldValue(dr,"RJC");
e.Item.Cells[11].Text=GetRowFieldValue(dr,"ZJYMD");
string gznr1=GetRowFieldValue(dr,"gcdzjk").Trim().Replace("\n","");
if(gznr1!=null&&gznr1.Length>30)
{
e.Item.Cells[13].Text="<a href=\"#\" onclick=\"showGZNR(\'"+gznr1+"\')\">"+gznr1.Substring(0,30)+"...</a>";
e.Item.Cells[13].HorizontalAlign=HorizontalAlign.Left;
}
}
}