hi ,
i want to know how i can change the image in gridview based on DataRow Value , such as in this forum when you Mark post as answer agreen true image appear !
assume That DataRow row =new DataRow();
if (row["PostStatus"]=="Answered")
{
change Image
}
if any one also can tell me how to do this in datalist i will be more happy , because i will need it
thank u
HappyNew year
Loading
Lalit MPosted Dec 31, 2009, 12:55 PM
protected void gv_OnRowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
gvImage = (GridView)e.Row.FindControl("Image");
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (null != gvImage)
{
gvImage.ImageUrl= "x.gif";
}
}
}
reference link
more info & Discus might be help Show also