CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Thursday, September 14, 2006

.NET code for gridview RowDataBound

protected void gridviewKatalog_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            DataRowView drv = (DataRowView)e.Row.DataItem;
            if (drv["Fotografija1"].ToString().Length < 1)
            {
                Image imgFotografija1 = (Image)e.Row.FindControl("imgFotografija1");
                imgFotografija1.Visible = false;
            }
        }     
    }

Post a Comment