Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Thanks for looking :)

I have the following situation I'm trying to remedy:

I have a DataGridView, which shows data from an arbitrary select statement. The select statement's data is returned in a DataTable, which is assigned as the DataSource for the DataGridView.

The problem occurs when a DataColumn returns Byte[] type data. I figured out how to just delete this column, which I don't consider to be a good solution.

I'd rather show a message in the DataColumn like "<Binary Data>" to the user instead of inexplicably deleting a column of data.

Is there a way of replacing the Byte[] type DataColumn with a String type DataColumn?
Is there a setting I don't know about in a DataGridView which would do this (like the DefaultNull setting, but for a Byte[] type column)?
Posted
Updated 21-Oct-10 7:44am
v2

1 solution

Some solutions discusses here[^] - maybe one of those can help you.
 
Share this answer
 
Comments
JessStuart 21-Oct-10 14:29pm    
Thanks for the reply Abhinav. These answers are a little frustrating, since because they talk about solutions, but don't really supply one (i.e "For an arbitrary BLOB, the closest I can think of is to just show something like the hex... but with DataTable even that is a challenge." - this is what I need to do, but the answer doesn't show me how to do it, which I need).
Abhinav S 22-Oct-10 0:23am    
Unfortunately I have not been able to find anything anywhere. If I do, I'll surely post it here.

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