protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// take the data in to dataset called ds
ImageButton ibtnSt = (ImageButton)e.Row.FindControl("ImageButton1");
int temp= int.Parse(ibtnSt.CommandArgument);
if (ds.tables[0].rows[0][3]== true)
{
ibtnSt.ImageUrl = @"image" + @"/iconGreen.gif";
}
else
{
ibtnSt.ImageUrl = @"image" + @"/iconRed.gif";
}
}
}
Monday, September 20, 2010
Red Green Button in gridview (true, False)
Posted by
codeguru
at
11:24 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment