Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Apr-13 19:11pm    
"I can't see pictures" is not a valid explanation of the problem. You would need to explain what did you try and what happened...
—SA
kozmikadam 8-Apr-13 0:18am    
I am creating a connection between Datagridview and DataSource.I write a query for display image. And when i clicked to "test" button it's work.I can see a little part of the picture.Not the whole picture. I clicked to "ok" button. İ see nothing. My databases value type is "image".So the problem could be this?
Sergey Alexandrovich Kryukov 8-Apr-13 0:28am    
Isn't it obvious: we cannot see where did you screw up things without looking at your code? I answered how to do it, without knowing what did you try.
—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
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900