如何在datagridview中显示图像?

问题描述:

我的照片在数据库中。 Sql值类型是图像。我想在gridview中显示我的图片。但我不能。我怎样才能做到这一点 ? Datagridview的数据源是正确的。但是我看不到图片。

My pictures are in the database. Sql value type is image. I want to display my pictures in the gridview. But i can''t. How can i do this ? Datagridview''s datasource is correct. But i can''t see pictures.

你总是可以派生出类 System.Windows.Forms.DataGridViewCell DataGridView 的单元格中显示任何内容。但是为了显示图像,这种细胞类已经存在。请参阅:

http://msdn.microsoft .com / zh-cn / library / system.windows.forms.datagridviewimagecell.aspx [ ^ ]。



-SA
You can always derive the class System.Windows.Forms.DataGridViewCell to show anything in the cell of a DataGridView. But for showing images, such cell class already exists. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewimagecell.aspx[^].

—SA


试试这个

http://www.aspsnippets.com/articles/ display-images-from-sql-server-database-in-asp.net-gridview-control.aspx [ ^ ]



全部最好



问候,

Gopinath
Try this
http://www.aspsnippets.com/articles/display-images-from-sql-server-database-in-asp.net-gridview-control.aspx[^]

All the Best

Regards,
Gopinath