views:

8

answers:

0

Hi guys,

Is there a way to display an image on a Boundfield of a dynamically generated GridView where the filename of the image is the data for that column? How can it be implemented?

I have implemented it this way but surely, this isn't right.

column = new BoundField();
column.DataField = "VITALITY_COLOR";
column.HeaderText = "Vitality Color";
column.DataFormatString = "../Style%20Library/OHImages/{0}";
grid.Columns.Add(column);

Kindly advise and thanks in advance.