This is a migrated thread and some comments may be shown as answers.

Trouble displaying bitmap BLOBs in DataGridViewImageColumn

2 Answers 185 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 21 Feb 2014, 07:55 PM
Trouble displaying bitmap BLOBs in DataGridViewImageColumn...

1) In Design View I created a radGridView.

2) I set the datasource to a EmployeeBindingSource that binds to a Employee SQL table that contains a BLOB field containing normal everyday employee photograph bitmaps.

3) The radGridView auto generated the columns and one of the columns is a DataGridViewImageColumn bound to my BLOB field.

4) When I run the application, I see all the fields displayed EXCEPT the fields in the DataGridViewImageColumn and I have no idea why.

From the DataGridViewImageColumn Telerik Documentation: "Supported image formats are those supported by the Image class of .net framework."
http://www.telerik.com/help/winforms/gridview-columns-gridviewimagecolumn.html
The .net Image Class does support my bitmaps because I use the image class to store the bytes in the blob field in the first place.

Any Ideas?

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Feb 2014, 03:12 PM
Hello Will,

Thank you for contacting us.

I have prepared a sample project, demonstrating how fill the GridViewImageColumn with data, coming from varbinary field a SQL table. The images are displayed as expected on my end. There is a .bak file available for my database.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
0
Will
Top achievements
Rank 1
answered on 26 Feb 2014, 03:30 PM
Thank you so much for your post and all the work you put into it.  I did discover my problem.  I was examining my dataset and discovered that the dataset adapter was filling all of the BLOB fields with NULL values.  After I fixed that, they displayed perfectly.

Best Regards,

-Will
Tags
GridView
Asked by
Will
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Will
Top achievements
Rank 1
Share this question
or