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
}

2



3

4



5

6

7

8

9

10

11
