Adding image type column in typed data table/set

A

Ashutosh

Hi,
How can I add an image type column in a typed data set/table? In the data
set designer, the data types available for selection doesn't include the
Image type.

I am not using any backend database. I just need to create a typed data
table with one of the columns as image type.

Regards,
Ashu
 
P

PvdG42

Ashutosh said:
Hi,
How can I add an image type column in a typed data set/table? In the data
set designer, the data types available for selection doesn't include the
Image type.

I am not using any backend database. I just need to create a typed data
table with one of the columns as image type.

Regards,
Ashu

Check this reference for datatypes that can be used in a DataColumn in a
DataTable:

http://msdn.microsoft.com/en-us/library/system.data.datacolumn.datatype.aspx
 
A

Ashutosh

Hi,
Thanks for the reply, but the link you pointed, I am already aware of those
things. It doesn't talk anything about the image.

I need to use a typed data table, not an un-typed table.

The designer doesn't allow any type other than the ones listed on the link
you provided.

Even if I set the data type to byte[], then there are two issues
1) How do I set value for that column ( I have the image in Image class'
object). I don't see any method to convert Image type to byte array. NOTE: I
am loading the images from the resource file.

2) I need to bind this table to data grid view. So, how does data grid view
knows that this column contains image (I think this can be done by setting
the column type, but I am not sure).


Regards,
Ashutosh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top