protected void Grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
Image ImageShow = (Image)e.Row.FindControl("imgGrid");
if (e.Row.RowType == DataControlRowType.DataRow)
{
string StatusShow = Grd.DataKeys[e.Row.RowIndex]["StatusShow"].ToString();
if (StatusShow == "OLD")
{
ImageShow.ImageUrl = "~/App_Themes/Images/Ok.png";
}
else
{
ImageShow.ImageUrl = "~/App_Themes/Images/Cancel.png";
}
}
}
{
Image ImageShow = (Image)e.Row.FindControl("imgGrid");
if (e.Row.RowType == DataControlRowType.DataRow)
{
string StatusShow = Grd.DataKeys[e.Row.RowIndex]["StatusShow"].ToString();
if (StatusShow == "OLD")
{
ImageShow.ImageUrl = "~/App_Themes/Images/Ok.png";
}
else
{
ImageShow.ImageUrl = "~/App_Themes/Images/Cancel.png";
}
}
}
No comments:
Post a Comment