DataGrid Display Graphic

  • Thread starter Thread starter Don Buchanan
  • Start date Start date
D

Don Buchanan

I'm trying to get a single column DataGrid to display a graphic. I set up
the DataGrid template to display and image. This is what I've tried based on
the example I found:

Dim dgiItem As DataGridItem

For Each dgiItem In DataGrid1.Items

With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)

.ImageUrl = sAddPath & "AT1.JPG"

.DataBind()

End With

Next

What am I doing wrong?

Regards,

Don Buchanan
 
Hi Don,
Dim dgiItem As DataGridItem
For Each dgiItem In DataGrid1.Items
With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)
.ImageUrl = sAddPath & "AT1.JPG"
.DataBind()
End With
Next
What am I doing wrong?

Did you check if a datagrid column can hold graphic data as far as I know it
can not
Did you check if you can add items to a datagrid, as far as I know you can
only bind them using an underlaying table

Cor
 
Back
Top