Click here to Skip to main content
11,702,130 members (61,610 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 Maciej Los 395
1 Sergey Alexandrovich Kryukov 355
2 OriginalGriff 314
3 CHill60 145
4 Mika Wendelius 119
0 OriginalGriff 8,344
1 Sergey Alexandrovich Kryukov 7,507
2 CPallini 4,922
3 Maciej Los 4,371
4 Mika Wendelius 3,556

Advertise | Privacy | Mobile
Web04 | 2.8.150819.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