开发者

Display an image on a Boundfield of a code generated GridView

开发者 https://www.devze.com 2023-01-20 09:23 出处:网络
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?

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.

开发者_StackOverflow社区
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号