It used to work like this but since I used itexsharp to generate a pdf, I set myself wrong and now I do not know how to correct it ..
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.Cells(6).Text.ToString = "True" Then
Dim img As New Image
img.ImageUrl = "~/Imagenes/Iconos_menus/Correcion.png"
e.Row.Cells(6).Controls.Add(img)
Else
e.Row.Cells(6).Text = ""
End If