Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL
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 7-Apr-13 11:47am
Comments
Sergey Alexandrovich Kryukov at 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
chuckcan08 at 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 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100