Link to home
Start Free TrialLog in
Avatar of cehrnow
cehrnow

asked on

gridview display image

Have programtically (intentionally) set up a gridview to display data from an XML dataset. Works fine expect when trying to display images in a column using following technique:

        dcol = New DataColumn("AnImage", GetType(ImageField))
        dcol = New DataColumn("AnImageURL", GetType(String))

        drow("AnImage") = New ImageField
        drow("AnImage").DataImageUrlField = "AnImageURL"

        drow("AnImageURL") = "image/picture.jpg"

Column just displays "ImageField". Any thoughts please ?
Avatar of BuggyCoder
BuggyCoder
Flag of India image

add a templatefield to your gridview columns.
In this template field add HtmlImage and assign its src the image path.
Avatar of cehrnow
cehrnow

ASKER

Thanks. Any chance you could show the code ?
ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cehrnow

ASKER

I see what you mean. Now reluctantly decided to use bound fields setup within design mode.
Thanks