tags:

views:

13

answers:

0

Hi. I have created a small application that uses Netflix odata service. I am binding the data to a GridView control. This works as expected expect the Image fields. Does anyone know how to bind the Image to a GridView column? For example, I am doing this to bind the other columns (this does not work for the image data that is in the BookArt complex type:

            BoundField Title = new BoundField();
            Title.HeaderText = "Title";
            Title.DataField = "Name";
            Title.HtmlEncode = false;
            GridView1.Columns.Add(Title);

            BoundField ReleaseYear = new BoundField();
            Title.HeaderText = "Release Year";
            ReleaseYear.DataField = "ReleaseYear";
            ReleaseYear.HtmlEncode = false;
            GridView1.Columns.Add(ReleaseYear);

            BoundField Genre = new BoundField();
            Genre.HeaderText = "Genre";
            Genre.DataField = "Type";
            Genre.HtmlEncode = false;
            GridView1.Columns.Add(Genre);

This does not work:
ImageField Image = new ImageField();
Image.HeaderText = "Image";
Image.DataImageUrlField = "BoxArt.MediumUrl";
GridView1.Columns.Add(Image);