[摘要]e.Item.ItemType == ListItemType.AlternatingItem ){ e.Item.Attributes.Add("title",e.Item.C...
e.Item.ItemType == ListItemType.AlternatingItem )
{
e.Item.Attributes.Add("title",e.Item.Cells[0].Text);
e.Item.Cells[0].Text = "<a target=_blank href=" + e.Item.Cells[1].Text + ">" + e.Item.Cells[0].Text + "</a>";
}
else
e.Item.Attributes.Add("style","background-color:#dedede");
}
</script>
</head>
<body>
<form runat="server">
<asp:DataGrid id="DataGrid1" runat="server" OnItemDataBound="DG_ItemDataBind" Style="font-size:9pt"/>
</form>
</body>
</html>
关键词:绑定txt文件到DataGrid