



























1.設定ColumnType為HyperLink;
2.設定HyperLinkDisplayText為:<img border=0 src='images\detail.gif'>
3.如果要在新窗口中彈出,設定Hyperlinktarget為"_blank"
4.加入代碼:
1
private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
2
{
3
if (e.Row.Type == RowType.Record)
4
{
5
WebGridCellCollection cells = e.Row.Cells;
6
7
8
cells.GetNamedItem("Detail").Value = "ProductDetail.aspx?ID=" + cells.GetNamedItem("編號").Text.Trim() ;
9
}
10
11
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。