set this column as template column and put two webcontrols in it:Label and ImageButton. set label's visible property as false,then write in codebehind like this way:
private void transpicforbool()
{
foreach(DataGridItem item in dgrd1.Items)
{
Label lbl=(Label)item.FindControl("lbl1");
ImageButton img=(ImageButton)item.FindControl("img1");
if(lbl.Text=="True")
{
img.ImageUrl=...;
}
else
img.ImageUrl=...
}
}
private void transpicforbool()
{
foreach(DataGridItem item in dgrd1.Items)
{
Label lbl=(Label)item.FindControl("lbl1");
ImageButton img=(ImageButton)item.FindControl("img1");
if(lbl.Text=="True")
{
img.ImageUrl=...;
}
else
img.ImageUrl=...
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货