Click here to Skip to main content
11,717,126 members (82,116 online)
Rate this: bad
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 10:47am
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...
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.
Rate this: bad
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:[^].


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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 659
1 F-ES Sitecore 260
2 Maciej Los 185
3 OriginalGriff 175
4 Richard MacCutchan 140
0 Sergey Alexandrovich Kryukov 1,029
1 Maciej Los 464
2 Richard MacCutchan 430
3 CHill60 415
4 OriginalGriff 415

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2015
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