PC Review


Reply
Thread Tools Rate Thread

DataGrid Display Graphic

 
 
Don Buchanan
Guest
Posts: n/a
 
      7th Apr 2004
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


 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      7th Apr 2004
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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphic Display DSmith Microsoft Access Reports 2 8th Dec 2006 04:18 PM
Replace a value wiith a graphic in a datagrid? simon Microsoft ASP .NET 4 22nd Mar 2006 03:05 AM
graphic display =?Utf-8?B?QmlsbCBQcm9jdG9y?= Windows XP Internet Explorer 2 26th Feb 2006 09:59 AM
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams Microsoft ASP .NET 0 2nd Mar 2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= Microsoft ASP .NET 0 2nd Mar 2004 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 AM.